Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Dlast Function on Page Load event

Status
Not open for further replies.

moles

Technical User
Jul 29, 2002
17
US
I am having trouble with the syntax of Dlast. My page opens and I have a field named auto_number that I want to be populated with Auto Number from Table Daily Health Check. Currently I have:

Me.auto_number.Value = DLast("Auto Number", "OLP Daily Health Check")

What am I missing????I am receiving a runtime error 3075 syntax error (missing operator) in query expression.

I know that there is a criteria argument for Dlast but I am not sure how to use it...

HELP me.....
 
Hi moles,

Try this:

Me.auto_number.Value = DLast("[Auto Number]", "[OLP Daily Health Check]")

This should work if [Auto Number] is the name of a field in a table named [OLP Daily Health Check]. You need the brackets because the field and table name contain spaces.
dz
dzaccess@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top