* typo in criteria field name <- my guess
* are there valid values in both controls
* what datatypes are the fields
* how does the string look (do a debug.print sSQL, then hit ctrl+g to study)
* how do you run it
And please, do have a look at for instance faq181-2886, perhaps in perticular #14 ...
Provided tha the table 'issues' has a numeric field named 'ID' and a text field named 'DocumentName':
sSQL = "SELECT * FROM [issues] WHERE ID=" & Me!txtLinkID & " AND DocumentName=[tt]'"[/tt] & Replace(Me!txtDocument,[tt] "'", "''") & "'"[/tt]
Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.