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

Access Query Wants Entry Data Twice

Status
Not open for further replies.

TommyP

MIS
Apr 16, 2001
30
US
Hello, I am stuck on this and cannot find the answer within the archives.

I use a between dates call within a query. Access has developed a nasty habit of asking the users to enter their date sets twice before returning the results.

Does anyone know how to fix this?

I have deleted the "between" statement within the query and saved. Then added the "between" query back and it is fine for about 5 inputs. Then it goes back to asking for the same date ranges twice.

Query example used on date field:
Between [Enter Begining Date] And [Enter Ending Date]

Thanks in advance!

 
TommyP

Is this a parameter query?

When running a query, (and not as a record set or in VBA) Access will prompt for an entry if it can not understand the variable name.

Second, queries can be nested.

If you are being prompted twice, check for a spelling mistake. Check to see if other queries are being run.

A tool to try this out is to open up the query in the query designer view. Run the query and look for possible errors, etc. You can edit the query (just make sure you don't save on top of the query used for your users until you have resolved the problem). When you edit the query, simplify it to see if you can tease out the problem.

Note: This type of problem can occur after making a database change -- changing the name of a variable in a table. You then have to make the changes in the impacted forms, reports and queries.

Richard
 
willr

I am not using a Parameter Query. You suggest checking for a spelling mistake. Where should I look?
 
willr,

ignore the last post. I will look everywhere! Thanks for your suggestions!
 
Here is my solution to the problem I initially described. I did not have any spelling errors and no other queries were being run.

All I did was to break the link betwen two tables and re-create it. Now the query runs like it should.

Now why would access behave normally after breaking a link between two tables and then re-creating them exactly as they were in the first place is beyond me!
 
Correction, the problem is back. When I broke the relationship between the two tables in the query and re-established them again, the problem went away. For how long I do not know...
 
TommyP

How much use does this database get?

Try running the compact and repair utility.
Tools -> Database Utilities

Sorry about the "hunting". The problem you were describing was fairly typical of a mispelt variable name in a query.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top