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

Query Information not saving

Status
Not open for further replies.

sdgman500

Technical User
Dec 8, 2003
41
US
I have a database where the user goes into 'Recon Cost query : Select Query' screen. They enter a date criteria like &quot;>#09/30/2003# And <#11/1/2003#&quot; and then they go to close that screen so they can run the query. If they exit and go back into the 'Select Query' screen, the criteria for the date changes back to &quot;>#6/30/2003# And <#8/1/2003#&quot;. Why doesn't the date stay at the user has changed it to? I would appreciate any help as I'm not a programmer or Access guru but have to fix this problem.

Thanks,
Shane
 
Have you considered not hard-coding the values? The simplest method is to set the criteria to parameters to
Between [Enter Start Date] and [Enter End Date]
I find it better to use references to controls on forms.

Are you sure that you are saving the query? Are warnings set off? Are there other users in the same MDB file?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
yes, we have thought about the &quot;between&quot; command. But I guess they have a report print out in a certain format.

So my user goes into one part(Edit Information) and sets the dates that they want the report to run from, then selects another section(Print Report) to run the actual report. Does that makes sense? Need a screen shot?

I didn't set up this db so I'm not sure how it works.

I really appreciate your help.
Shane Gardner
 
From your first posting, I assumed the user was going into the query design view. Apparently, they are using an unbound form. Since it is unbound, there will not generally be any values saved anywhere once the form is closed. If you want to save values, you will have to bind the form to a table.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
How do I do that? Bind the form? Yes. Those two selections that the user makes(from my post above) are in a Startup form.

This form use to work, has worked for 2-3 years. Within the last 2 months is when it broke?

 
As long as you keep the form open, the values should be retained. If the form gets closed, I assume the values will not be retained. Does this ring true with your experience?

Open the form in design view. Does the form have a record source? Is there a command button to close or hide the form? What is the code behind this button if any?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Thank you for your advice. As I was following it, trying to get in design form, it said something about not being able to change it cuase it was created in an older version. I converted the db to a newer version and it started working???? Don't know how that did it but it seemed to.

Thanks again for all your help. I really appreciate your effort.

Shane
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top