Re: Transfer date to access dbase if issue
Looks like you need to reformat your IIFstatement a bit.
Code:
IIf(etape2.Text <> "", "[Etape2_date]", "'" & DTPicker19 & "'")
The line above will return [Etape_date] or the value of the DTPicker depending on the existance of an entry in the text field. In one case your SQL statement will not be valid. As you will be trying to insert a field name where a date is expected.
To get around this you need to either use conditional statements to exclude the Field from the list of expected fields in the first part of your insert statement as well as not sending a value in the case where you do not want to save the data or you can insert a null assuming your db will allow it.
Always use [code][/code] tags when posting code.