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!
Daniel Pineault - 21 Jan 2008 14:15 GMT
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]

Signature
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
> hello i have the following txt box withis code
>
[quoted text clipped - 5 lines]
>
> Please help! or the puppy gets it!
Douglas J. Steele - 21 Jan 2008 15:58 GMT
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.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> hello i have the following txt box withis code
>
[quoted text clipped - 6 lines]
>
> Please help! or the puppy gets it!
smason - 23 Jan 2008 01:01 GMT
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!
> hello i have the following txt box withis code
>
[quoted text clipped - 5 lines]
>
> Please help! or the puppy gets it!