data report


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: data report

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Posts
    106

    data report

    Hello
    I want to have a program in VB 6 that has a listbox that is filled from an Access db among other controls. I want to be able to pull up a data report based on what is selected in the listbox or the record currently being viewed whichever is easier. I can pull up my data report just fine but there are several clients each having their own data report and they are all in one long report that is basically the same report repeated several times with info particular to each client. I hope that makes sense.

    What I would like is to pull up individual reports and have the report pull up that corresponds to the client that is in the listbox. I don't want the report pulled up by clicking on the list box but rather when the user clicks a button. I used this successfully in another program. But don't want to prompt the user for input but rather just click a button and pull up the report for the record that is being viewed.

    Private Sub ModuleReport_Click()
    If demoduleReport.rsCommand1.State = adStateOpen Then
    demoduleReport.rsCommand1.Close
    End IF

    moduleSN = InputBox("Select a module serial number to view a report on it", "Module Report")
    If moduleSN <> "" Then
    demoduleReport.Command1 moduleSN I think the change is needed here.
    ModuleReport.Show
    ModuleReport.WindowState = 2
    ElseIf moduleSN = "" Then
    MsgBox "You haven't entered a valid number", _
    vbCritical, "Invalid number"
    End If
    End Sub

    If I have a list box called lstClient I suppose I need to somehow reference the listindex.

    thanks for any help!
    Steve

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    See if the following helps:

    How To Refresh a Parameterized DataReport

    If you want the value of the currently selected item:

    Dim strItem As String

    strItem = List1.List(List1.ListIndex)
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

Similar Threads

  1. Data Environment / Data Report
    By Duane Snelling in forum VB Classic
    Replies: 1
    Last Post: 11-09-2001, 02:30 PM
  2. Active Data & ADO & Crystal Report
    By annex in forum VB Classic
    Replies: 0
    Last Post: 06-07-2001, 01:23 AM
  3. Re: Help with data report (RUSS - A QUESTION)
    By shannan in forum VB Classic
    Replies: 1
    Last Post: 05-04-2001, 05:02 PM
  4. Help with data report
    By shannan in forum VB Classic
    Replies: 1
    Last Post: 05-02-2001, 10:04 PM
  5. Data Junction Announces XML Junction 7.51
    By Tim Frost in forum xml.announcements
    Replies: 0
    Last Post: 04-02-2001, 11:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center