D
Dave K.
I am trying to use a Dlookup function in a form to return a value from the
last entered record for a set of criteria. my current SQL Statement is as
follows:
Private Sub Mail_Type_AfterUpdate()
Me![Beginning Meter Reading] = DLookup("[beggining Meter Reading]",
"CopytblMeterReadingstest", "[mail type] = Forms![CopyFrmTest].Form![Mail
Type] and [Machine Model]=Forms![CopyFrmTest].Form![Machine Model]")
End Sub
For example Table data
Entry Date Machine Model Mail Type Beggining Reading Ending Reading
1 10/29/2008 250 REG PS FLAT 60116.246 60116.246
11 10/30/2008 250 REG PS FLAT 60116.246 60129.519
want to fill in the Beginning Field on the form with the Previous ending
Reading
last entered record for a set of criteria. my current SQL Statement is as
follows:
Private Sub Mail_Type_AfterUpdate()
Me![Beginning Meter Reading] = DLookup("[beggining Meter Reading]",
"CopytblMeterReadingstest", "[mail type] = Forms![CopyFrmTest].Form![Mail
Type] and [Machine Model]=Forms![CopyFrmTest].Form![Machine Model]")
End Sub
For example Table data
Entry Date Machine Model Mail Type Beggining Reading Ending Reading
1 10/29/2008 250 REG PS FLAT 60116.246 60116.246
11 10/30/2008 250 REG PS FLAT 60116.246 60129.519
want to fill in the Beginning Field on the form with the Previous ending
Reading