|
-
Sep 17th, 2000, 01:25 PM
#1
Thread Starter
Dazed Member
Can one tell me how i could print what an sql statement
is returning in a picture box. If i use frmDriverQuery.picDriverQuery.Print SQL I just get the
actual query printed into the picture box not what i want
extracted from the database. I really have no clue how to
do this! {{{laughing}}}
Private Sub cmdDriverQuery_Click()
'When a Drivers ID Number is entered into the textbox and the Driver Query button
'is clicked a list of accounts that the driver is assigned to will popup
Dim strSQL As String
strSQL = "SELECT * FROM [Driver Information]WHERE [Driver ID] = '" & Trim(txtDriverQuery.Text) & "'"
Set rs = db.OpenRecordset(strSQL)
frmDriverQuery.Show
frmDriverQuery.picDriverQuery.Print rs!SQL ?????
End Sub
-
Sep 18th, 2000, 01:43 PM
#2
Frenzied Member
You'll need to loop thru the recordset.
Do While Not rs.EOF
frmDriverQuery.picDriverQuery.Print rs.Fields(0)
'concatinate the remaining fields in the recordset to the end of the above statement (with & " " & rs.Fields(1), for example)
rs.movenext
loop
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
|