Import txt file and Check dates

shark70

Registered User.
Local time
Today, 21:42
Joined
Sep 12, 2004
Messages
13
I need to set up a macro that will import a daily ORDERS text file with data for the Columns below. I have set up a delete query to run before the daily file gets imported
Business Date Subscription SubStatusCode EntitlementCode NumberOfSubscriptions Currency


I then need to append this file to a historic file (on a daily basis) but only if the Business Day is greater than the Maximum Business day on the Historic file.
I also need to bring an error message up if the imported file Business day already exists

Is it possible to do all this in 1 macro

I haven't done much with macroes so any help is greatly appreciated

Thanks
Shark70
 
Firstly, you can do a lot without using macros here. Do you need to import the text file each day? Can't you just link to the text file? Then you can skip having to import, just append the data. Filter your append query if you want to exclude certain items. If you want an error message to come up you will need to run a macro, but do you definitely need the error message? If you haven't done much with macros, I would do as much as you possibly can without them to reduce brainache!
 
Import

Of course I don't know the ins and outs of your project, but wouldn't it be better to put the daily orders in the database directly, instead of using a text file. It seem you could save a a lot of headache and when the data is in the mdb you can manipulate it anyway you want.

Trucktime
 
Set a field value to the current date in Macro

I import a text file into Access using a spec. In the spec, I created a new field that is not in the original text file called DateModified. After I import the text file, I want to update the filed to todays date i.e. using the NOW()

I am trying to add a command to my macro, that transferst eh text file, to input this date in all the records but I cannot seem to figure it out. Any help out there? You can email me directly if it is easier. Debbiepy@comcast.net

Debbie
 
Can you post the code for your macro debbie? Again, you can use an update query for this, and you can trigger that from your macro.
 

Users who are viewing this thread

Back
Top Bottom