Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

return recordser

Status
Not open for further replies.

goobil

Technical User
Aug 9, 2003
38
AG
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
goobil@hotmail.com
 
do you get an error message or is the data not being returned? your code looks correct, except for the fact that you aren't returning it.
 
I might be reading it wrong, but your SQL statment seems to be
Code:
Select * from employee_info where Me![employeeID] = '" & Me.employeeID & "'"
I think the WHERE clause should probably be
Code:
"WHERE employeeID = '" & Me.employeeID & "'"
The SQL needs to have the name of the column in the table and not the Me! part.

PeteJ
(Contract Code-monkey)

It's amazing how many ways there are to skin a cat
(apologies to the veggies)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top