Update empty records in field after import

Daadian

New member
Local time
Today, 10:09
Joined
May 8, 2009
Messages
5
Okay I have searched and searched for this and there HAS to be an easy answer. I have a macro that imports a delimited text file, appending data in an existing table. The table has a field that I added, for "As of Date". That remains empty and basically ignored during the import process which is fine. I have the update process handled by a form with a button to run the macro and the import process runs flawlessy.

Two things I need and can't seem to wrap my head around doing.

1) Currently the macro is set to import a specific file name (which is fine the name never changes anyway) and in a specific location. Which would normally be fine but instead of it doing that I would like a browse option to select the location and file for importing before pressing the button. **This is a nice to have feature and NOT mandatory**

2) This part is the mandatory one that I must have for this database to be useful at all. After the import process happens. I need to fill all those empty fields created during the import process in the "As of Date" field with a date that I can select through an input box or date picker (preferred as long as it defaults to today's date).

The original form with the button could contain a text box for the date input as well rather than an input box if thats easier.

The text file generates approximately 26,000 records daily, but the information is useless without an as of date.

I'll be eternally grateful for a push in the right direction. I am a newbie in macros and VBA but once it is written I can follow and understand it to change it or fix it to my needs.

Thanks
 
The table has a field that I added, for "As of Date".

In the table where this field is located set the Default Value of this field to Date()

Re Browse option, it would be easier if you stored the file location in a table and change the table when the location changes. Otherwise, each time you import you will spend time finding the location.
 
Add a control for the date next to your import button. User types in the date, then presses import. Your append query can grab the date from the control and put in record at time of insert.

Evan
 

Users who are viewing this thread

Back
Top Bottom