Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Defaulting to Taday's Date in a Mask Edit Box

Status
Not open for further replies.

heprox

IS-IT--Management
Dec 16, 2002
178
US
I have a form in a simple application that uses a mask edit box to allow the user to enter a date. Whenever the user first loads the form I want the mask edit box to default to the current date so something like:

Private Sub Form_Load()
mskEffectiveDate.Text = "sysdate"
Call PopulateStore
End Sub

What is the correct syntax for this?
 
try

mskEffectiveDate.Text = date



Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.
 
hi

put in value property of the textbox -> date()

Program Error
Programmers do it one finger at a time!
 
Just putting in:

mskEffectiveDate.Text = date

gives an "Invalid Property Value" debug error.

Mask Edit Box does not have a "Property" field like a text box.

It has to be somewhere in the properties of a mask edit box?
 
Tr this instead:

If your mask looks like this ##/##/####

then do this

MaskEdBox1.Text = Format(Date, "dd/mm/yyyy")





Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.
 
Thanks, worked like a charm...
 
Excellent.



Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top