Link to home
Start Free TrialLog in
Avatar of iamlori
iamloriFlag for United States of America

asked on

Goto first Null Record

I have a table that lists all the days of the year with fields: Date and Yards.  The idea is to enter a number of yards for each day of the year.
I have a form (in datasheet view) that allows the user to enter the number of yards for each date.  Right now - when the form/datasheet opens - it goes automatically to 1/1/2006 (because that is the first record of the table).  What function/event can I use so that the form will open and find the first null value in the Yards field?  (avoiding the scrolling to the next empty record).
ASKER CERTIFIED SOLUTION
Avatar of LenaWood
LenaWood

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of raopsn
raopsn

Try this on Form Open event

Dim rs As DAO.Recordset
Set rs = Me.Recordset
rs.FindFirst "[Yard] Is Null"
SOLUTION
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Remember, Date is an Access function and should never be used as a table, field, or variable name.  If you absolutely have to, remember is must always be surrrounded by brackets when you make reference to it in a query or a module.