Text box value changes after tab

W

wpshop

I have a form that contains a name, email address, and extension. When I
select the name from the drop down box it will automatically update the email
address and extension based on the table which is the source of the form.
The problem is when I tab off of the name the extension and email address are
changing to the next record's information. Here is the code I am using in
the "AfterUpdate" for the name combobox.

Private Sub ResearcherName_AfterUpdate()
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[ID]=" & Me.ResearcherName
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
End If

End Sub
 
J

Jeff Boyce

It sounds like the form may be based on the table, so when you <Tab> past
the end of one record you see the next.

Open the form in design view, open the form's properties, find the Cycle
property, and set it so that it stays on the same record.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

Similar Threads


Top