Automated Dates in Tables

Artemis Hothmire

Registered User.
Local time
Today, 17:17
Joined
Nov 19, 2012
Messages
23
Good afternoon,

I am building a database and am trying to automate month names and years to appear in my table upon adding a new record. I have the code built to input the data I am calling from other tables, and have functioned it to work on a button click. Now I want the record to capture the current date and year everytime a new record is added and input that information into the respective fields. Can anyone help me with this? Thank you in advance.:cool:
 
It sounds like you capture the date, but then in the same table you want the month name. Is that correct? If so, you shouldn't.

Calculated data (i.e. Month Name, Day of Week, account balance, Age, etc.) shouldn't be stored, it should be calculated when needed. Specifically, when you need the month's name, you use the Month() (http://www.techonthenet.com/access/functions/date/month.php) and MonthName () (http://www.techonthenet.com/access/functions/date/monthname.php) functions that are built into Access.
 
Good morning Plog,
Got it. My next question is how do i put that value into mycode. I have buit an insert statement but I keep getting syntax errors. Once i select my field for teh insert potion what would the value look ,ike?
 
What value is 'that' value? Why are you using an INSERT statement and not an input form? What do you mean by 'selecting' a field?

There are warning lights sounding all over my computer about your last post. It sounds like we might need to back up a few steps and sort out what the purpose of this database is.
 

Users who are viewing this thread

Back
Top Bottom