MULTIPLE RECORDSET RETURN

  • Thread starter Thread starter dk
  • Start date Start date
D

dk

Hello all of You !
I need Your help.
I have table tblEvents and table tblClients.
Id like to create recordset which will return all events (multiple records)
from table tblEvents associated with Client name.


Set db = CurrentDb()
Set rst = db.OpenRecordset("tblEvents", dbOpenDynaset)
rst. "ClientName = '" & me.ClientName & "'"
rst.close

Thank You in advance
Regards,
DK
 
I cant remember much about DAO, but I think you would be better using a SQL
Statement:
Dim strSQL as String
strSQL = "SELECT * FROM tblEvents WHERE ClientName = '" & Me.ClientName &
"'"
Set rst = db.OpenRecordset(strSQL,dbOpenDynaset)
....
 
Yes, You re right !
Thanks !
DK
James Goodman said:
I cant remember much about DAO, but I think you would be better using a SQL
Statement:
Dim strSQL as String
strSQL = "SELECT * FROM tblEvents WHERE ClientName = '" & Me.ClientName &
"'"
Set rst = db.OpenRecordset(strSQL,dbOpenDynaset)
...
 

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

Back
Top