Locating Records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am new to Microsoft Access, but have had lots of experience in dBase. I am
trying to figure out how to locate a record (based in EmpID). So far as I
can tell, I can only create a query then input the criteria before it can
find the record. I want to have a display similar to or the same as a form
display, and in the EmpID field, enter the ID number and have the record
appear.

The general purpose would be to pull an employee record up in order to edit
appropriate fields, ie FT to PT, hourly wage change, etc.

Thanks,
Les
 
Build a popup form (MyPopupForm) with some method to select or enter the
EmpID of the record you want to go to. Create a Close button on the form as
well as a Continue button. Put the following code in the Click event of the
Continue button:
Me.Visible = False

Put the following code in the Click event of Locate Employee button on your
Employee form:
DoCmd.OpenForm "MyPopUpForm",,,,,acDialog
If IsLoaded(MyPopUpForm") Then
Dim Rst As DAO.Recordset
Set Rst = Me.RecordsetClone
Rst.FindFirst "[EmpID] = " &
Forms!MyPopUpForm!NameOfEmpIDControlOnMyPopUpForm
Me.BookMark = Rst.BookMark
Rst.Close
Set Rst = Nothing
End If
 

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

Back
Top