Automate data entry

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a form that has many text boxes- Month/ Year, Full Name, Year,
Quantity, Reason and Initials.

I wanted after entering 05/06 in the MONTH/YEAR text box, The YEAR text box
will display 1/1/06.

Likewise, after entering 08/07 in the MONTH/YEAR text box, The YEAR text box
will display 1/1/07 or 2007.


(The month in the MONTH/YEAR text box will be change from 01 to 12 since
there are 12 months in a year).


Thank you
Chi
 
You do not need to store the data twice. If you would use a date field, you
then can use the format fuction to display the date however you would like.
 
Hi schasteen,
Thanks for your response. However, I do need to store the data like that
way. Do you have any ideas.
Thanks
Chi Huynh
 
Chi said:
Hi,

I have a form that has many text boxes- Month/ Year, Full Name, Year,
Quantity, Reason and Initials.


Note: I would usually advise against having a field for Full Name. It
is much better to keep the name as (FName; Mname and Lname) Three different
fields. From that you can pull out initials if you like or put together the
name in any form you like or sort and or search any part of the nane, from
just those fields.

This follows the same idea of not saving the month when you already have
a field that includes the month.
 
Is your filed a date field? If so in the after update event of the
Month/Year field put
Me![Year] = format(Me![Month/Year],"YYYY")
or
Me![Year] = year(Me![Month/Year])

See, you do not need to store this data twice since you could put the
experssions in the control source of the year control. You can also use
these expressions in queries and anywhere else you would need it.

If you are storing it as text, you could do like Joseph suggest and just
have a month field and a year field.
 

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

Similar Threads


Back
Top