473,385 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Automatically input date into a parameter in Access query

I have three querries that I am trying to run from a macro instead of running them one at a time. Each query promts for a date when opened. I would like to be able to enter the date once for all three. I know there must be an easy way to do this, but I can not seem to find it.
Jan 21 '10 #1
2 2347
Delerna
1,134 Expert 1GB
One method is to bind the criteria of the field in each query to a textbox on a form. Enter the date in the textbox and then each query will open using that date. The drawback is that the form must be open.

Criteria
Forms!FormName.TextboxName


Another method would be a table that only ever has one record in it with a field for each parameter required.

Then you just join to the desired field in the parameters table in your queries, and arrange that the date parameter (in your case) gets updated before you open the queries


There must be a million and one ways, which is best?
It depends on your design requirements.
Jan 21 '10 #2
I went the table route. That was tooooooo easy. Sometimes the easiest is the hardest thing to see. Thanks for the help.
Jan 22 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: netsurfer | last post by:
Hi: Have a question on making the date automatically filled in by what the user enters in by the date at the top. The date entered at the top would most likely be on a Wednesday then I need...
10
by: Kenneth | last post by:
I have a Query that consist of a lot of different sales data, and one of the colums are different date. The date goes from 1jan2003 til 31jan2003. in this Query I only want the salesdata for...
7
by: Nicolae Fieraru | last post by:
Hi All, I have a table tblProducts where I have four fields:\ Index, ProductName, EnterDate (as Date/Time - Medium Date), PurchaseDate (Date/Time - Medium Date) The EnterDate is automatically...
4
by: Tony | last post by:
Hey guys, I use Google Groups quite a bit as it is an enormous wealth of information, and now I need some help. I have created a query using parameters to capture a range of date, the date is...
2
by: Tony | last post by:
Hello everyone, Okay so here is my pickle! I have a field called ARCH_DATE within a table which has a date stored like "9/1/2004 23:50:00". What I would like to do is create a date range which...
2
by: Julie Wardlow | last post by:
Help! I am calculating a future date using the DateAdd function in a query (the calculation also involves an IIf statement), and have managed to get this formula to produce the required result....
2
by: gritter55 | last post by:
I have a parameter query in Access 97 that working for 99% of my users. But for 2 of them, when they run it, it skips over the input box (they never see it) and simply returns an empty set. I...
3
by: Stephen V | last post by:
Can anyone help me out with this problem. I would like to redirect/ go to another php page when my SQL insertion is done and also send a variable at the same time. the idea is, to come on my...
10
by: Daniel | last post by:
In Microsoft Access I can write a query that includes the criteria: Between Date()-7 And Date() to retrieve the records from a table that fall within the last week. I'm trying to write a...
3
by: Fred's | last post by:
Hi Folks, I have a report which the record source is a query name: Query3 and in my Query3 I have this parameter "between And ". Therefore, when I open my report, it will ask for a Start Date...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.