vikramonline
Programmer
I have a table called tblFlight_Schedule in MS-Access which has got two fields arrival time and departure time (both date/time fields and not reqired).I want to update the details of a flight online.
sql = "update tblFlight_Schedule set Origin = '" & org & "',Destination='"
sql = sql & destination & "',Flight_No='" & flt & "',Category='"
sql = sql & category
sql = sql & "',DepartureTime = '" & deptime
sql = sql & "',ArrivalTime = '" & arrtime & "'"
It works fine when both arrival time and departure time is given,but if anyone is left blank I get a Data type mismatch error.
I know I am doing something stupid somewhere.
Please advise.
sql = "update tblFlight_Schedule set Origin = '" & org & "',Destination='"
sql = sql & destination & "',Flight_No='" & flt & "',Category='"
sql = sql & category
sql = sql & "',DepartureTime = '" & deptime
sql = sql & "',ArrivalTime = '" & arrtime & "'"
It works fine when both arrival time and departure time is given,but if anyone is left blank I get a Data type mismatch error.
I know I am doing something stupid somewhere.
Please advise.