-
I am getting a data conversion error when i am moving a date from a label to a new db when the field is a date format do you guys have any ideas? thanks
-
WHat is the code you're using to convert the label to the database?
-
all im doing is this
Data1.Recordset![Retirement Date] = lblRetire.Caption
and im sure there is soimething else i should do but im not sure
-
You need to convert the label from a string to a date using CDate(lblLabel.caption)
You should probably use the format(lbllable.caption, "MM/DD/YYYY")
to format the label into the correct date format. So for example:
Data1.Recordset![Retirement Date] = format(cdate(lblRetire.Caption), "DD/MM/YYYY")
This would format the label's caption to a format of day/month/year.
Hope this helps.
-
Maybe you can try:
Data1.Recordset![Retirement Date] = "#" & lblRetire.Caption & "#"
-
both of those did work... I have one more question how do you clear out a text box? the cls doesnt work do you have any ideas?
-