G
George
I've got a form called XYZ that has a record ID in one of the fields,
[BKWakeREID],on the form. I want to open a related database, called GES,
and create a temp recordset from GES using the following code. The XYZ form
is open and the following code is executed under a command button click sub.
The control named BKWakeREID contains the pointer to the records in GES.
Dim RS As DAO.Recordset, myCaseID As String, db As DAO.Database
Dim stDocName As String, stLinkCriteria As String, mySQL As String
Set db = CurrentDb()
mySQL = "SELECT GES.* FROM GES WHERE GES.Account = me![BKWakeREID]"
Set RS = DBEngine(0)(0).OpenRecordset (mySQL, dbOpenDynaset)
I'm getting an error when I execute the openrecordset command of "Too few
parameters, Expected 1"
Could someone suggest the correct syntax to fix this?
[BKWakeREID],on the form. I want to open a related database, called GES,
and create a temp recordset from GES using the following code. The XYZ form
is open and the following code is executed under a command button click sub.
The control named BKWakeREID contains the pointer to the records in GES.
Dim RS As DAO.Recordset, myCaseID As String, db As DAO.Database
Dim stDocName As String, stLinkCriteria As String, mySQL As String
Set db = CurrentDb()
mySQL = "SELECT GES.* FROM GES WHERE GES.Account = me![BKWakeREID]"
Set RS = DBEngine(0)(0).OpenRecordset (mySQL, dbOpenDynaset)
I'm getting an error when I execute the openrecordset command of "Too few
parameters, Expected 1"
Could someone suggest the correct syntax to fix this?