G
glnbnz
I have a datefield in a form that I would like to have autofilled when I
enter a new record. Right now I have something like this:
If Me.NewRecord then
Me.DateGauged = DMax("DateGauged","tblGaugesInput") + 1
End if
My problem is that it just looks for the max date of the whole table. I
would like to narrow it down to a specific group of records in the table and
do the last date + 1 on that group: Example of my table.
TankNumber DateGauged Measurement
8555 2/1/2008 8"
8555 2/2/2008 9"
8556 2/1/2008 7"
So when I open my add form for tank 8556 I would like for it have 2/2/2008
in the DateGauged field. The way I have it written it will put in 2/3/2008.
Please help.
Thank you
glnbnz
enter a new record. Right now I have something like this:
If Me.NewRecord then
Me.DateGauged = DMax("DateGauged","tblGaugesInput") + 1
End if
My problem is that it just looks for the max date of the whole table. I
would like to narrow it down to a specific group of records in the table and
do the last date + 1 on that group: Example of my table.
TankNumber DateGauged Measurement
8555 2/1/2008 8"
8555 2/2/2008 9"
8556 2/1/2008 7"
So when I open my add form for tank 8556 I would like for it have 2/2/2008
in the DateGauged field. The way I have it written it will put in 2/3/2008.
Please help.
Thank you
glnbnz