dlookup!

  • Thread starter Thread starter smason
  • Start date Start date
S

smason

hello i have the following txt box withis code

[ data required] [from this qry] [id from form] [id from
qry]
=DLookUp("[steps taken]","qry steps count","[employee id]=[employee id]")

what is wrong with this as it doesn't work!

Please help! or the puppy gets it!
 
What is '[ data required] [from this qry] [id from form] [id from qry]'?

The DLookup should be like

DLookUp("[steps taken]","qry steps count","[employee id]=" & Me.[employee id])

As for '[ data required] [from this qry] [id from form] [id from qry]'
Try something like one of the following

Me.id_from_qry

Or

Forms![ data required]![from this qry]![id from form].Form.[id from qry]
 
Since there are spaces in the name qry steps count, you need square brackets
around it.

Where are you getting employee id from? Presumably the first one in
"[employee id]=[employee id]" refers to a field in the query, but what is
the second one supposed to be? As that stands, you'll be comparing a field
to itself.
 
Sorry the data in brackets was indicating what i thought was the data and
sequence needed in case it was wrong! any way thanks for the response! all
solved!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top