|
-
Feb 13th, 2009, 09:55 AM
#1
Thread Starter
Addicted Member
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.
-
Feb 13th, 2009, 11:20 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|