I am trying to use the runsql command and I am encountering a strange problem.
The following works:
DoCmd.RunSQL ("INSERT INTO financial VALUES ('" & clientNumber & "', " & txtFinancial & ", '" & firstname & "', '" & surname & "', '" & txtDate & "', '" & txtTime & "', '" & editdate & "', '" & edittime & "', Null, Null, Null, '12', 'Bob', 10)")
But when I change the Null to a textbox with a null in it, it wont work:
DoCmd.RunSQL ("INSERT INTO financial VALUES ('" & clientNumber & "', " & txtFinancial & ", '" & firstname & "', '" & surname & "', '" & txtDate & "', '" & txtTime & "', '" & editdate & "', '" & edittime & "', '" & txtacc & "', Null, Null, '12', 'Bob', 10)")
The textbox txtacc has a null value in it.
This is frustrating me beyond belief. Please help.
Thank you in advance
The following works:
DoCmd.RunSQL ("INSERT INTO financial VALUES ('" & clientNumber & "', " & txtFinancial & ", '" & firstname & "', '" & surname & "', '" & txtDate & "', '" & txtTime & "', '" & editdate & "', '" & edittime & "', Null, Null, Null, '12', 'Bob', 10)")
But when I change the Null to a textbox with a null in it, it wont work:
DoCmd.RunSQL ("INSERT INTO financial VALUES ('" & clientNumber & "', " & txtFinancial & ", '" & firstname & "', '" & surname & "', '" & txtDate & "', '" & txtTime & "', '" & editdate & "', '" & edittime & "', '" & txtacc & "', Null, Null, '12', 'Bob', 10)")
The textbox txtacc has a null value in it.
This is frustrating me beyond belief. Please help.
Thank you in advance