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

Query Date parameters promting order question

P: n/a
I had a query with a criteria in a date field reading ">[DATE] And
<[Date2]", and when run, it correctly prompted first for the [DATE]
param, and then for the [Date2] param. I then created functions to
replace these params using an input box so that I could control the
default date in each case (based on the current day of week and other
variables). Each function works correctly, but for some reason, the
first prompt is for [Date2], and the second prompt is for [Date],
which should come first. Can someone explain how parameters are
presented to the user, and why I'm getting param2 first now?

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


P: n/a
jmev7 wrote:
I had a query with a criteria in a date field reading ">[DATE] And
<[Date2]", and when run, it correctly prompted first for the [DATE]
param, and then for the [Date2] param. I then created functions to
replace these params using an input box so that I could control the
default date in each case (based on the current day of week and other
variables). Each function works correctly, but for some reason, the
first prompt is for [Date2], and the second prompt is for [Date],
which should come first. Can someone explain how parameters are
presented to the user, and why I'm getting param2 first now?

Thanks.


No idea, to be honest, but if you wrap the whole call to the query in a
function/sub, and set the parameters (still from the user with InputBox)
by code, the problem can be solved.

Works well with action queries, not so well with SELECT (what to do with
the recordset, then?)

--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #2

P: n/a
Bas Cost Budde <ba*@heuveltop.org> wrote in message news:<c0***********@news2.solcon.nl>...
jmev7 wrote:
I had a query with a criteria in a date field reading ">[DATE] And
<[Date2]", and when run, it correctly prompted first for the [DATE]
param, and then for the [Date2] param. I then created functions to
replace these params using an input box so that I could control the
default date in each case (based on the current day of week and other
variables). Each function works correctly, but for some reason, the
first prompt is for [Date2], and the second prompt is for [Date],
which should come first.

<snip>
No idea, to be honest, but if you wrap the whole call to the query in a
function/sub, and set the parameters (still from the user with InputBox)
by code, the problem can be solved.


Acutally, I have considered this, and just executing the SQL statemet
from within the function, but the user appears to want to be able to
modify the query using the QBE, and this would not be possible from
within a coded SQL statement. I might do it anyway and say, "TOUGH!",
but I would like to stick around for a little while longer :-)
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.