473,408 Members | 2,734 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,408 software developers and data experts.

Append query based on a wildcard date

114 100+
I'm trying to create an append query (for the purpose of archiving data) that has one parameter value asked:

"Archive data for what date?"

I want the user to enter the date of choice in the parameter value dialog box so that all data with the entered date is archived (appended).

Expand|Select|Wrap|Line Numbers
  1. INSERT INTO STARTS_ARCHIVE
  2. SELECT STARTS.*
  3. FROM STARTS
  4. WHERE ((STARTS.ScheduledRunDate) [Archive data for what date?]);
I've tried several different options and could use some simple help. I'm using MS Access 2003. Thank you!
Aug 20 '07 #1
6 1787
Rabbit
12,516 Expert Mod 8TB
Query > Parameters
That'll let you define your parameters and their data type.
Aug 20 '07 #2
martin DH
114 100+
Query > Parameters
That'll let you define your parameters and their data type.
That option is grayed-out....
Aug 20 '07 #3
Rabbit
12,516 Expert Mod 8TB
You're in SQL View, go to query design view.
Aug 20 '07 #4
martin DH
114 100+
You're in SQL View, go to query design view.
Oops. Thanks. Now, in "parameter" what do I type for what I am trying to accomplish: the user enters a date and the query appends all records with that date? I know the "data type" is date/time.
Aug 20 '07 #5
martin DH
114 100+
Oops. Thanks. Now, in "parameter" what do I type for what I am trying to accomplish: the user enters a date and the query appends all records with that date? I know the "data type" is date/time.
Sorry! I just figured it out. I just type in "parameter" whatever I want to appear in the popup dialog box and it takes care of the rest, correct?
Aug 20 '07 #6
Rabbit
12,516 Expert Mod 8TB
You give the parameter a name, which is what the user will see. Let's say you named it [User Defined Date]

Then in the query, it'll be:
Expand|Select|Wrap|Line Numbers
  1. PARAMETERS [User Defined Date] DateTime;
  2. SELECT *
  3. FROM SomeTable
  4. WHERE Format(DateField, "m/d/yyyy") = Format([User Defined Date], "m/d/yyyy");
  5.  
Aug 20 '07 #7

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

Similar topics

2
by: John | last post by:
Hi - I am trying to perform a simple append query, with no luck. I have a table (MktPrices) that has the following fields: BondID, PriceDate, Price. The objective is to allow the user to input a...
2
by: Ray Holtz | last post by:
I have a form that shows a single record based on a query criteria. When I click a button it is set to use an append query to copy that record to a separate table, then deletes the record from the...
3
by: DHarris | last post by:
I created a continuous form in Access2003 based on a query that users review customers and once reviewed clicks on a command button that executes an append query to update a table of the reviewed...
4
by: dougmeece | last post by:
Morning Everyone... I have a table that needs to be append to and also updated. All the fields in the table are populated with data from the text boxes and combo boxes on a form. The Date...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
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...

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.