A
Albert D. Kallal
You got a number of problems where:
First, you sql has to be correct.
You got
Me![employeeID] =
Do you really have bizare field called me![Emplyeeid]? I kind of doubt it.
You likely have a field called EmployeedID
Further, you are using a constant of dbOpenDynSet
Just leave the constant out all to gether, or use dbOpenDynaset
so, I would suggest trying the following code:
dim strSql as string
Set Db = CurrentDb
strSql = "Select * from employee_info " & _
"where EmployeedId = " & me!EmployeeId
However, if EmplyeedId is a text/string type field, then you do have to
surround the above value with quotes (as you correlity had) , so we would
get:
strSql = "Select * from employee_info " & _
"where EmployeedId = '" & me!EmployeeId & "'"
Set rst = Db.OpenRecordset(strSql)
First, you sql has to be correct.
You got
Me![employeeID] =
Do you really have bizare field called me![Emplyeeid]? I kind of doubt it.
You likely have a field called EmployeedID
Further, you are using a constant of dbOpenDynSet
Just leave the constant out all to gether, or use dbOpenDynaset
so, I would suggest trying the following code:
dim strSql as string
Set Db = CurrentDb
strSql = "Select * from employee_info " & _
"where EmployeedId = " & me!EmployeeId
However, if EmplyeedId is a text/string type field, then you do have to
surround the above value with quotes (as you correlity had) , so we would
get:
strSql = "Select * from employee_info " & _
"where EmployeedId = '" & me!EmployeeId & "'"
Set rst = Db.OpenRecordset(strSql)