Results 1 to 2 of 2

Thread: How can i make individual print?

  1. #1

    Thread Starter
    Addicted Member dbasenoob's Avatar
    Join Date
    Jan 2009
    Location
    San Pedro Laguna - Philippines
    Posts
    206

    Question How can i make individual print?

    i have a problem it prints all the records in database,then
    then how can i make a individual print via clicking the item on list box then click the print button?

    here's the code
    Code:
    Private Sub cmdPrint_Click()
    Dim rsRep As ADODB.Recordset
    Set rsRep = New ADODB.Recordset
    
    rsRep.Open "select * from info", CN ' CN is active connection
    
    Set DataReport1.DataSource = rsRep
    DataReport1.Show vbModal
      
    End Sub
    please supply my code if there is lacking.

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: How can i make individual print?

    The WHERE clause is used to specify that only certain rows of the table are displayed, based on the criteria described in that WHERE clause. It is most easily understood by looking at an example.

    If you wanted to see the EMPLOYEEIDNO's of those making at or over $50,000, use the following:
    Code:
    SELECT EmployeeIdNo
    FROM   EmployeeStatisticsTable
    WHERE  Salary >= 50000;
    What I mean is read about WHERE clause

    Now, if Your problem is to get an item from the listbox then You can use
    Code:
    Private Sub List1_Click()
    
        MsgBox List1.List(List1.ListIndex)
    
    End Sub
    Last edited by jggtz; Feb 13th, 2009 at 11:30 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
  •  



Click Here to Expand Forum to Full Width