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!

syntax for "on the fly" date/time query 1

Status
Not open for further replies.

Saxie1

Technical User
Jan 20, 2000
15
US
I am using the following query to select qualifying records:

SELECT tblOrder.OrderNum, tblOrder.CloseTime, tblOrder.BusinessDate
FROM tblOrder
WHERE (((tblOrder.CloseTime) Between #2/11/04 4:01:00 am# And #2/12/04 4:00:00 am#));

Since my users are not very adept at writing queries, I want them to run the existing query. I need to have it prompt them for the date but leave the times as they are. I know how to use the [enter date] format to prompt for an input, but haven't figured out the proper syntax so my user enters only the date.

Am I going about this wrong...maybe use a macro instead???Any help would be appreciated.
 
Hi

Your basic idea is sound, but instead of using the (User Unfriendly) [Enter Date], use a form to get the data from the user, then by setting the format of the text box you can limit the user to entering only the date and you can amend your querydef to use the values entered in the form. Eg Forms!MyForm!MyDate.



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hi Ken,

Thank you for your quick response. This query is used via PCAnywhere over a satellite connection to more than 1500 locations. Currently the SQL text has to be pasted into a new query at each location when it is needed.

I don't think its possible to export a form without copying the whole database then exporting the form. I would like to avoid exporting anything if possible.

Is there a way to do the query?


Thanks again!!

Phil
 
Hi

Sorry I do not see the relevance of teh PC anyWhere bit, or understand what you are talking about when you speak of exporting the form.

My understanding of PC Anywhere is that it allows PC "A" to connect to PC "B" over a slow line, only the screen contents are sent from B to A, and all processing (of the database occurs on B.

So what is the problem?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hi Ken,

Heres the deal...each site has its own separate database. The problem is that once the form is created, it would need to be distributed to each of the 1500 sites. You are correct, all the processing occurs on "b", but the form has to be created/exported in each site first.

I am not the original developer, and am very limited in what I can update/change. What I am trying to create is a supplemental tool to help my team mates pull information from this mess of a database that someone else wrote.

I currently have to manually filter and sort the information needed. I just want to streamline the process a little, and save some keystrokes when selecting data. Its alot easier to run the query and type 2/11/04 and 2/12/04 than to manually filter Between #2/11/04 4:01:00 am# And #2/12/04 4:00:00 am.

If the query can't be done, then so be it.

Thanks anyway. :)

Regards

Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top