unbound text boxex and dates
I am writting a small VB6 system to track employee check-in and check-out times and dates. The entry form uses unbound text boxes. I have gotten most everything to work except the dates.
1) how do I use an unbound text box to capture a date input by the user, use it to compare to date fields in an MSAccess table (date fields) and to write to the MSAccess table? I keep getting type mismatch.
2) how do I put an input mask on the text box to format the entry with "/" as it's being entered?
Any help would be appreciated.
[530 byte] By [
BillC] at [2008-1-31]
Bill C wrote: |
| I am writting a small VB6 system to track employee check-in and check-out times and dates. The entry form uses unbound text boxes. I have gotten most everything to work except the dates. 1) how do I use an unbound text box to capture a date input by the user, use it to compare to date fields in an MSAccess table (date fields) and to write to the MSAccess table? I keep getting type mismatch. 2) how do I put an input mask on the text box to format the entry with "/" as it's being entered? Any help would be appreciated.
|
|
Bill,
Have you considered using a masked text box for displaying/getting the date? It should help with making sure that only a date is entered into the textbox. The regular textbox does not have this capability. I believe if you add a reference to the common controls for windows, it should have it (one of them should).
What are you using now where you are getting the type mismatch? I assume you are using ADO.
Hope this helps.
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com