473,698 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2096
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.solc on.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
14124
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 (and store it in field 2). > > I would like to run a query that returns all the data in the table plus the > record number, in a similar sense to the getuser() command to get the User's > Identity, I would like a GetRecord() command.
6
17914
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 year & month When I try to place a date filter 'Between x And y ' on an expression field
9
2882
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 RecordSource is Query1. So when I run Report1, Access prompts "Enter Value". Everything's good so far.
3
1400
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 query works fine through Query Analyzer or if I do not set SQLParameter for the query. I hope someone spots what I overlooked. Please let me know if I have missed something. Thanks in advance. Here is the query: ALTER PROCEDURE...
7
3386
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 either AND or OR but never mixed together. We can use Northwind database for my question, it is very similar to the structure of the problem on the database I am working on. IF(SELECT OBJECT_ID('REPORT')) IS NOT NULL DROP TABLE REPORT_SELECTION
2
2080
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 using data imported from an Excel file and the person entering into Excel only cared about the month and day portion and Excel added the current year to the field value. I want to produce a report that shows upcoming anniversaries using a parameter...
9
2774
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 from searching on the internet and books but the problem is when i run the command button "Export" it just only open the Blank Spreadsheet, no data at all that it came from my query named "HVACWindwardQuery" and there's an error on it...
4
4585
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 reservation of available resources (laptops, beamers, etc). The MySql database queries are already in place, as is the ASP administration panel. The frontend that users will see however, still needs some work. I'm really close, but since I'm no...
19
6019
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 original tread http://bytes.com/topic/access/answers/872005-query-date-range Just to clarify what I am trying to achieve....
0
8608
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9161
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6522
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.