How can i go to the next blank record in the table , such a blank record exists ?
In my form Customers, i have a command button with the following command :
DoCmd.GoToRecord , “”, acNewRec
DoCmd.GoToControl “CompanyName”
The above command is OK, but i want to amend it somehow . Do to some reasons the users click the button without entering a new customer,
and in this case the table contains a customerid without a CompanyName. Therefore, my task is the following :
If in the table customers there are records having blank CompanyName, then do not go to the next record, but go to the next blank record,
without CompanyName, in ascending order I imagine my code to do the following :
If Is Null the first field from the table with blank CompanyName Then
go to this blank record ( the first in ascending order)
Else
DoCmd.GoToRecord , “”, acNewRec
DoCmd.GoToControl “CompanyName”
End If
If i succedd, then we will have no blank CompanyNames in our database.
Is it posible and can somebody help me ?