B
BobV
Group:
I am trying to write a subroutine that will find the first record where the
[Date Sold] field has a date entered in it. After finding the record, I want
to move to that record. Eventually, I want to write code to loop through
each record that has a date entered in the [Date Sold] field and make
changes to those records. But I can't get the code to find the first field
where a date is entered.
What am I doing wrong? Any suggestions will be greatly appreciated.
Thanks,
BobV
Dim db As DAO.Database
Dim rst As DAO.Recordset
DoCmd.GoToRecord , , acFirst
Set db = CurrentDb
Set rst = db.OpenRecordset("Query1-" & CompanyName)
rst.FindFirst "[Date Sold]>0"
I am trying to write a subroutine that will find the first record where the
[Date Sold] field has a date entered in it. After finding the record, I want
to move to that record. Eventually, I want to write code to loop through
each record that has a date entered in the [Date Sold] field and make
changes to those records. But I can't get the code to find the first field
where a date is entered.
What am I doing wrong? Any suggestions will be greatly appreciated.
Thanks,
BobV
Dim db As DAO.Database
Dim rst As DAO.Recordset
DoCmd.GoToRecord , , acFirst
Set db = CurrentDb
Set rst = db.OpenRecordset("Query1-" & CompanyName)
rst.FindFirst "[Date Sold]>0"