Retrieving a value from a table

G

Guest

I'm wondering if there isn't an easier/better way to get a value from a table
in code. Right now I do this kind of thing:

Dim db As Database
Dim RS As DAO.Recordset
Dim mySQL As String
Dim strResult As String

Set db = CurrentDb
mySQL = "Select user_info.*, user_info.Logon_ID " & _
"From user_info " & _
" Where (((user_info.Logon_ID)=CurrentUser()))"
Set RS = db.OpenRecordset(mySQL, dbOpenDynaset)

'....Code in here...
RS.Close
 

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