|
-
Aug 15th, 2001, 02:01 PM
#1
Thread Starter
Addicted Member
problem saving date field
I'm saving the contents of textboxes in 2 the recordset on the click of the Save button. If I hv a blank field in the textbox specified fr Date and I try to save it in the recordset, it givz an error. This happens even when I try 2 append a "" to it.
TrainingStartDate is a SmallDateTime field
rsEmployeeInfo!TrainingStartDate = " " & txtTSDate.Text
figured this wd work
If Trim(txtTSDate.Text) = "" Then
rsEmployeeInfo!TrainingStartDate = Null
Else
rsEmployeeInfo!TrainingStartDate = " " & txtTSDate.Text
End If
Is there any other way around it or is this OK-coz I hv 5-6 Date fields.
2.) I want 2 know frm where I can use the Date Control->I was told it wd b in the MS Windows Common Controls, but its not there
-
Aug 15th, 2001, 02:10 PM
#2
Hyperactive Member
If you are talking about the Date/Time Picker it is in MS Windows Common Controls 2.
-
Aug 15th, 2001, 03:13 PM
#3
New Member
You might try typing the text by adding a '#' before and after ..
For example"
rstMyRecords.Field("FieldName").Value = "#" & txtBox.Text & "#"
I usually make sure I convert all data before I put into a database.
triley
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|