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

#name? in forms/reports

Status
Not open for further replies.

erisar1

Technical User
Mar 27, 2002
6
US
I am a beginner, and this is probably a very easily solved problem, but I can't figure it out for the life of me:

I have several tables in my database. I want to create a single form that has textboxes that have their control source set to display the value of a cell in one of my tables. Every time I try to set the control source to a value that is not on the same table as my record source of the form/report, I get a #name? error. Please help!
 
Make a query to join all your tables first. Then base the form on the query. That should do it.
-Dustin
Rom 8:28
 
Thanks for your help Dustman, but I want to do something a bit different and don't think I can join the tables with relationships.

I want to have 1 table and 1 form in which a tax rate is set (for example). I then want to be able to have a new form in which I can have a "price" field and a "price with tax" field. In the formula for the control source of the "price with tax" field, I have to reference another table (the "tax rate" field). This gives me a #name? error. What can I do to fix this?

Please Help!
 
I think I get what you are trying. Can you try something like this in you control source:
Code:
=(DLookUp("taxRate","otherTable","id = " & [id]) * [price]) + [price]
Format is DLookUp (ColumnName,TableName,Criteria)

I'm assuming you have some sort of item id that will link it to a tax rate id. If this isn't correct.. maybe you could post the code you tried and I'll we'll see if we can figure it out. -Dustin
Rom 8:28
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top