How to retain a partial date in a text box

G

Guest

If a partial Date field is entered in an Access form, Access automatically
infers a complete date (e.g., an entry of 9/05 (MM/YY) is automatically
modified to 9/5/2006).

I want to manipulate the partial date for special processing; however, the
Access modification occurs before the BeforeUpdate event, so at that point
the input has already been changed.

Can anyone tell me how I can read and record the actual text as input into
the form before Access changes it?
 
F

fredg

If a partial Date field is entered in an Access form, Access automatically
infers a complete date (e.g., an entry of 9/05 (MM/YY) is automatically
modified to 9/5/2006).

I want to manipulate the partial date for special processing; however, the
Access modification occurs before the BeforeUpdate event, so at that point
the input has already been changed.

Can anyone tell me how I can read and record the actual text as input into
the form before Access changes it?

Read the control's Text property.
Code the control's BeforeUpdate event:

MsgBox Me![ControlName].Text
 
G

Guest

Thank you! That enables me to do what I intended in a very straightforward
manner.

fredg said:
If a partial Date field is entered in an Access form, Access automatically
infers a complete date (e.g., an entry of 9/05 (MM/YY) is automatically
modified to 9/5/2006).

I want to manipulate the partial date for special processing; however, the
Access modification occurs before the BeforeUpdate event, so at that point
the input has already been changed.

Can anyone tell me how I can read and record the actual text as input into
the form before Access changes it?

Read the control's Text property.
Code the control's BeforeUpdate event:

MsgBox Me![ControlName].Text
 

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


Top