What is the best way to set up a mskbox or txtbox to enter dates and SSN. I have been trying to find the best way to do this. I have a mskbox setup and formatted so that it works, but curious to see other ways.
Printable View
What is the best way to set up a mskbox or txtbox to enter dates and SSN. I have been trying to find the best way to do this. I have a mskbox setup and formatted so that it works, but curious to see other ways.
for entering a date, I wouldn't advise using a textbox. You should use the DateTime Picker. It is already nicely formatted and you don't have to worry about an entry mask or about having all of the "/" in the right places.
The problem with the date/time picker is that it doesn't allow blank dates without the use of that nasty checkbox.
I use that date/time picker when I have a default date that I can load into the control initially. Otherwise I live with the limitations of the mask edit box.
:):)
That's true about the blank field/checkbox issue. One way around it is to add a default date when adding a new record, using the Date(Now) function. It would look something like:
Code:Private Sub AddRecord()
'with the ADO control
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("DATE") = Date(Now)
'or with an ADODB recordset
myRS.AddNew
myRS.Fields("DATE") = Date(Now)
End Sub