Go to a specific record when opening a form

G

Guest

I have created a database where employees update records in a form on a daily
basis. The table is appended each day and new records are added to the end
of the table. There are numerous text boxes that are automatically filled,
and specific text boxes that are to be filled by the employees. Is there a
way to have the form open an automatically jump to the first record where
these empty text boxes appear? In other words, I don't want the employees to
have to page through records to get to the first record where they need to
enter information. Thanks so much for your help!
 
F

fredg

I have created a database where employees update records in a form on a daily
basis. The table is appended each day and new records are added to the end
of the table. There are numerous text boxes that are automatically filled,
and specific text boxes that are to be filled by the employees. Is there a
way to have the form open an automatically jump to the first record where
these empty text boxes appear? In other words, I don't want the employees to
have to page through records to get to the first record where they need to
enter information. Thanks so much for your help!

Do you mean go to a new record when the form is opened?

Code the Form's Open Event:

DoCmd.RunCommand acCmdRecordsGoToNew
 
P

Pieter Wijnen

In The Form Open Event

Private Sub Form_Open(Cancel As Integer)
Dim RsC As DAO.Recordset
Set RsC = Me.RecordSetClone
RsC.FindFirst "MyField Is Null" ' Or "MyField1 Is Null Or MyField2 Is Null
"
If Not RsC.NoMatch Then
Me.BookMark = RsC.BookMark
End If
Set RsC = Nothing
' you can also set a filter on the form
' Me.Filter = "Field1 Is Null"
' Me.FilterOn = True
End Sub

HtH

Pieter
 

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

Top