Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate an append query based on dates

Status
Not open for further replies.

BLPandAJF

Technical User
May 6, 2000
6
0
0
US
Hi-

I am trying to add a dreary task to a macro and I'm stuck...

In my Access 97 database, there are 10 or so tables which get refreshed (from an inventory mgmt. package) every few days. I need to append data related to new information only (from ORDER TABLE)to a separate table (HOLD STATUS). The dates reside in the field BILL DATE.

I can manually run the append query with parameter prompts [Enter Start Date] and [Enter End Date] but I want to add this process to the macro which "refreshes" the data in the first place.

In my append query I tried to set the criteria for the field BILL DATE to > Max BILL DATE (in the table HOLD STATUS). Didn't work.

I also tried to append records that were Between (pointed to table/field which listed previous refresh date) and (pointed to table/field which listed latest refresh date). This didn't work either. I'm not sure if this one failed because of date formatting (BILL DATE is formatted yyyymmdd and although I set the refresh date fields to this format, it appears that the date is actually stored as mmddyyyy).

Can anyone help me figure this out? I'm not up on visual basic - I just design my queries in the "design grid" mode.

Thanks.
 
Make a macro which name = AutoExec;

Macro -> Run Query
This macro run your query all the times if u start the application.
Sorry if i have a lot of grammar mistake. I learn english at time.
Try it. Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top