How do I lookup a record from within a form, if the primary key is unknown. Using VBA.
Posted on 2004-08-13
Probably a simple question, but here goes;
I have a unique field value, which isn't and can't be the primary key to a record (a fingerprint scan).
I need to lookup the correct record that matches, if any exist.
I know how to do this in VB6 with -
sSQL1 = "SELECT * FROM Employees WHERE Employees.fkAlpha = " + "'" + Me.FkAlpha + "'"
Set DB = OpenDatabase("c:\employees.mdb")
Set rst = DB.OpenRecordset(sSQL1)
What do I do if I'm in a form in Access?
I need to have this done automatically, so I can display the record for the user.