Referrence a field rather than a parameter

nh0h

New member
Local time
Today, 09:57
Joined
Nov 19, 2011
Messages
4
Having a problem completing a calculation in a query: When I type in a field name (enclosed in square brackets) in a calculation, things look fine. But, when I run the query, it treats the field name as a parameter and asks for the parameter's input. How do I get access to use the quantity in the referenced field for the calculation rather than ask for parameter iput?
Thanks,
Tim
 
Dear John,

Thanks, but that article didn't help. Could there be a problem with my copy of Access 2010?
Tim
 
Let's see the SQL statement and a screenshot of your query. For the screenshot, I just want to see the tables and their field names.
 
Could be corruption of the query.

Try copying the SQL of your query into a newly created query.
 
Gentlemen:
Thank you for your help so far. I've attached a screen shot of my query so you can see what is happening (or not happening).

Now for new information: I created this database for a local research organization where I volunteer. The database contains water test results for over 9 years. My home computer runs Access 2010 and the research organization's runs Access 2007. I enter data both at home and at the research organization.

Today, I copied the database to a flash drive and took it with me to upload the new data and work at the research organization. I was talking to the research director about the problem and showed him how it worked. Surprise, surprise -- the query worked perfectly on their machine running Access 2007. At home, Access 2010 still trreats the field reference as a parameter. Glitch in Access 2010? Corruption of my program? I tried a simple query using a field reference and it works just fine at home, but using a complicated formula, it treats it as a parameter.

Unless you have any other suggestions, I will try to delete my Access Program and reload it from the original disks.

Thank you,
Tim
 
Oops, forgot to attach the screen shot. Here it is:
 

Attachments

  • Snip1.jpg
    Snip1.jpg
    92.3 KB · Views: 86
You will need to zip the image before you upload it because you have less than 10 posts.

Also, show us the SQL statement of your query.
 
Ah... it's attached.

This might just be another good example why you should have spaces or use characters like "(" or ")" in field names. Remove those characters from the field name in your table, edit your query and see the result.
 
As I believe my esteemed college :D was trying to say; Avoid spaces and other special charters in object and control names as this will greatly complicate things (as I believe you are starting to discover), limit yourself to alpha and numeric charters and the Underscore (_). Also consider a naming protocol, along the lines of TBL_TableName, FRM_FormName, QRY_QueryName etc.
 

Users who are viewing this thread

Back
Top Bottom