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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VBA to set default values

Status
Not open for further replies.

AlexCuse

Programmer
Apr 13, 2006
5,416
US
I have an access front end used for data processing in a SQL database. It was written (not by me)to use "ResetTblName" to reset a table before importing data. This makes sense, because we need to reset the auto number. I am trying to modify this for daily reporting, so I need to add an "ImportDate" field. I added it to the template, but the default value of Date() does not carry over. What is the easiest way to use vba to set the default value of that field to Date()? Thanks a lot,

Alex
 
PS "ResetTblName" is a function that basically just calls one make-table query. Probably should have indicated that. Table is made from template, doesn't carry over the default value from template though.
 
Because of time constraints I have this process running an update query at the moment to set the date before upload to SQL Server. Still, if anyone has an idea for how to change default I'd be interested, just to save some run time. Thanks a lot,

Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top