By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,560 Members | 949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,560 IT Pros & Developers. It's quick & easy.

How to store a date entered into a query?

P: n/a
Hi,

Hope someone can help by keeping this as simple as possible.

I'm creating a query that requires a date input from the user. So, up pops
the dialogue box and my user enters 19/05/2004.

Is there a (*very simple*) way to store what the user has entered so that a
subsequent query simply looks it up and performs various actions? (e.g if
orderstartdate is greater than userinputdate, ignore else process
order........that sort of thing)

This needs to be kept as simple as possible because, although I'm quite
comfortable with Access and SQL, Visual C etc in general, my users are
complete novices.

The solution can be as crude as you like, I just need one!

Cheers.
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Put the date as a variable onto a form, then refer to the variavble in
the query

in params = Forms!FormName.DateVariableName

Using forms to store vars saves memory anyway. If you're not sure
whucg form maybe loaded pick on ethat always is and whack them onto
that.

Forget the dialog box

Regards Bill
Nov 12 '05 #2

P: n/a
I am unaware of any way to store the results of a user defined parameter in
a query, but you could create a very simple form, set it's default display
property to datasheet, and use an inputbox in the form's on load event to ask
for user input. Of course, you'll have to create a table to store the results
of the input box for later processing.

You could put the logic you referred to in a standard module and call it from
the same event. There's a little more to it, but I think this is a simple
approach.
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.