|
-
Apr 28th, 2001, 01:20 AM
#1
A little QueryDef Education Please?
I am getting an error when I try to requery a table and I do not see anything wrong with the code. Can anyone assist?
The error I get is:
Run Time Error '3421'
Data Type Conversion Error
Here's the code:
Public db As Database
Public rs_detail As Recordset
Private Sub Form_Load()
...
...
Set rs_detail = db.OpenRecordset("SELECT * FROM items ORDER BY blk_no ", dbOpenDynaset, dbReadWrite)
FindDetails (rs_master!blk_no)
...
...
End Sub
Private Sub FindDetails(findBlk As String)
Dim qdef As QueryDef
Dim strsql As String
strsql = "SELECT * FROM items WHERE blk_no = " & findBlk & " ORDER BY blk_no "
Set qdef = db.CreateQueryDef("", strsql)
qdef.SQL = strsql
****** The error occurs on the next line *******
rs_detail.Requery (qdef)
Thanks for the help!
DonB
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
|