473,378 Members | 1,380 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,378 software developers and data experts.

Query Date parameters promting order question

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
2 2063
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John Ortt | last post by:
> I have a table of dates in ascending order but with varying intervals. I > would like to create a query to pull out the date (in field 1) and then pull > the date from the subsequent record...
6
by: Tony Miller | last post by:
All I have an aggregate query using the function Month & Year on a datereceived field ie: TheYear: Year() TheMonth: Month() These are the group by fields to give me a Count on another field by...
9
by: David Horowitz | last post by:
Hi. I have a query named Query1. Let's say it looks like this: Select * from Table1 where Field1= So whenever you run the query, it prompts for "Enter Value". So now, I have Report1, whose...
3
by: Rob | last post by:
I have a problem I can't seem to solve although it should be easy. I've done these many times before. But I keep getting an exception, "Line 1: Incorrect syntax near 'GetFinancialData'." This...
7
by: serge | last post by:
How can I run a single SP by asking multiple sales question either by using the logical operator AND for all the questions; or using the logical operator OR for all the questions. So it's always...
2
by: Bill | last post by:
I have a 200 record database that includes a date/time field, AnnivDate, for a wedding anniversary. AnnivDate has nulls and some incorrect year data. I have been creating the Access database...
9
by: QCLee | last post by:
Sir can you help me to transfer my Access Query to MS excel? i have a command button on the form to export the parameter query named "HVACWindwardQuery" to excel spreadsheet and i got the codes...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
19
by: phill86 | last post by:
Hi I am re-posting this thread because it has become very confusing and I have got some way to solving the problem so it is a slightly different question from the initial thread. here is the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.