Get recordset

V

Van T. Dinh

If EmployeeID is Numeric, try:

Set rst = Db.OpenRecordset("Select * from employee_info where
[employeeID] = " & Me.employeeID, dbOpenDynaset)


If EmployeeID is Text, try:

Set rst = Db.OpenRecordset("Select * from employee_info where
[employeeID] = '" & Me.employeeID & "'", dbOpenDynaset)

Note the correct spelling of dbOpenDynaset.
 
K

Kenneth Goodwin

Hi guys,
Can some one please tell me why this dont work.

I am trying to get some data from the table to check before update or save
as new

Dim bankRs As DAO.Recordset
Dim employeeRS, emptypeRS, rst As DAO.Recordset
Dim xemployeetype, empID As String


Set Db = CurrentDb
Set rst = Db.OpenRecordset("Select * from employee_info where
Me![employeeID] = '" & Me.employeeID & "'", dbOpenDynSet)

Kenneth
(e-mail address removed)
 

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