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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting values in textbox when opening form.

Status
Not open for further replies.

fiel

Programmer
Jun 3, 2007
96
US
I'm not sure if this is possible, but I have a crosstab report that lists the names of all workers across the sheet. I'm trying to but their Hourly_Wages underneath in a seperate text box, but while setting up the crosstab query, I was only allowed 1 field for a column heading. But would it be proper to simply put text boxes below each and use a Dlookup to set the value or can I only do that in a form?
 
Here's what I have tried doing

=DLookup("BILLINGRATE","qrSet1","NAME=" & [NAME])

When I run the report, I get an error saying 'The Microsoft Jet Database engine dose not recognize 'POSITION' as a valid field name or expression'. Does anyone happen to know the proper syntax towards the end of the DLookup function for a string?
 
If this is going to work at all, the syntax would probably be:
=DLookup("BILLINGRATE","qrSet1","NAME=""" & [NAME] & """")

Also, name is not a good name for anything in Access since every object has a name property which if you give it the value name then you may have serious with Access not knowing if you are referring to the Name property or the Name field.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top