Using SELECT Statements in Code

S

Sharkbyte

Is it possible to assign values to variables, in code (such as the On Open
event) using a standard SELECT statement?

I'm aware that RunSQL only works for action queries, and so am at an impass.

The scenario is that I have a table, which either contains valid records, or
does not. I need to query the table, for valid records, and return a null or
a value. I'm thinking I may be able to use a record count, in place of the
Select statement, but at this point my brain is toast, and I can't seem to
come up with anything to use.

Any help would be appreciated.
 
X

xRoachx

Hey Shark, if we couldn't use SQL in code, we would all be in trouble!
Anyhow, you can use recordsets to accomplish a variety of tasks including
what you have hinted at.

As a suggestion, the more specific you are in your question, the better the
responses will be. In the mean time, search for recordset in the Access help
file or the message board for more info. Also, post some specifics about
what you want to accomplish and some one will more than likely help you out.
 
Top