Get recordset

  • Thread starter Thread starter Van T. Dinh
  • Start date Start date
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.
 
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)
 
Back
Top