Date format in Tables

D

davespace

I have two seperate records in a table: Month (mm) and
Year (yyyy)

Is there a way to format/update these seperate records
using current Month and Year as individual data? I am
required to provide this information on a monthly basis
and creating and/or editing an Update Query every 4 weeks
is tedious (and likely not the most efficient way of
achieving the desired results). Currently I have the
records Default Value set to "01" and "2004" respectively
for each field so that when I perform my Append Query it
populates the cell with is Default Value, but when 02
(February) rolls around I will have to edit the records
Default Value to reflect the new month. I hope this makes
sense...TIA

David
 
D

Duane Hookom

I'm confused. Do you have two fields or two records? The current month is
always Month(Date()) and the current Year is always Year(Date()).
 
J

John Vinson

I have two seperate records in a table: Month (mm) and
Year (yyyy)

Is there a way to format/update these seperate records
using current Month and Year as individual data? I am
required to provide this information on a monthly basis
and creating and/or editing an Update Query every 4 weeks
is tedious (and likely not the most efficient way of
achieving the desired results). Currently I have the
records Default Value set to "01" and "2004" respectively
for each field so that when I perform my Append Query it
populates the cell with is Default Value, but when 02
(February) rolls around I will have to edit the records
Default Value to reflect the new month. I hope this makes
sense...TIA

David

Set the Default properties of the fields to

Format(Date(), "mm")
and
Format(Date(), "yyyy")

respectively.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top