Recordset Criteria

G

Guest

Sean,
I don't know if you have gotten a working solution yet but
the way I work with the SQL statements in VB is as follows:

Dim dbs as database
Dim rst as rRecordset
Dim l_str_SQL as string
l_str_SQL = "select * from AddressBook" _
& "where CompanyName=" _
& "'" & SearchCompanyName & "');"


-----Original Message-----
I have no clue why this is so hard. I need to pass
criteria to open a recordset with criteria from a field on
a form. Every combination of quotes and such I have tried
will not work. So I have to filter it after I open it,
which completely (I think) misses the point of calling
only the data I need and being effecient.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top