Setting up a field with default value

G

Guest

Hi. Hoping someone can help with my dilema. I have an Access database with
a field called DEPOSIT DATE (format is MM/DD/YYYY) and another field titled
DUES PERIOD (format is text, with a defined input mask=XX/XX). What I would
like to do is the have the DUES PERIOD "automatically" populate itself based
on whatever DEPOSIT DATE the user keys in . For example: If the Deposit
Date is 05/05/2005, then I would want the DUES PERIOD field to automatically
enter 05/05 (for month and last 2 positions of the year). Is this
doable? If so, how? THANKS MUCH!
 
J

Jeff Boyce

Carol

Step away from the computer!

You actually do NOT want to add in the same data twice -- this is poor
design and leads to problems with synchronization of the fields, among other
issues.

Instead, record the date in your [DepositDate] field. Now build a query
that returns both the deposit date, and a formatted field, based on the
deposit date. You could probably use something like:

DuesPeriod: Format([DepositDate],"mm/dd")

in your query (your syntax may vary).

Good luck!

Jeff Boyce
<Access MVP>
 
T

tina

DuesPeriod: Format([DepositDate],"mm/dd")

though to get the month and year from the deposit date, you'll want to use
"mm/yy".

hth


Jeff Boyce said:
Carol

Step away from the computer!

You actually do NOT want to add in the same data twice -- this is poor
design and leads to problems with synchronization of the fields, among other
issues.

Instead, record the date in your [DepositDate] field. Now build a query
that returns both the deposit date, and a formatted field, based on the
deposit date. You could probably use something like:

DuesPeriod: Format([DepositDate],"mm/dd")

in your query (your syntax may vary).

Good luck!

Jeff Boyce
<Access MVP>

Carol said:
Hi. Hoping someone can help with my dilema. I have an Access database
with
a field called DEPOSIT DATE (format is MM/DD/YYYY) and another field
titled
DUES PERIOD (format is text, with a defined input mask=XX/XX). What I
would
like to do is the have the DUES PERIOD "automatically" populate itself
based
on whatever DEPOSIT DATE the user keys in . For example: If the Deposit
Date is 05/05/2005, then I would want the DUES PERIOD field to
automatically
enter 05/05 (for month and last 2 positions of the year). Is this
doable? If so, how? THANKS MUCH!
 

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