Hi All
I have the following SQL string:
strSql = "INSERT INTO t_ClientDemographics(client_FirstHCTVisitDate, client_ClientCode, client_FirstName, " & _
"client_LastName, fk_EmploymentStatusID, client_ClientEmployee, client_JobTitle, " & _
"fk_IdentificationTypeID, client_IDPassportNumber, fk_CountryID, fk_GenderID, client_DateOfBirth, " & _
"client_Age) SELECT #" & CDate(Format(client_FirstHCTVisitDate.Value, "dd/mm/yyyy")) & "#, '" & _
UCase(strHCTClientCode) & "', '" & LCase(client_FirstName.Value) & "', '" & LCase(client_LastName.Value) & "', " & _
CLng(fk_EmploymentStatusID.Value) & ", '" & LCase(client_ClientEmployee.Value) & "', '" & _
LCase(client_JobTitle.Value) & "', " & CLng(fk_IdentificationTypeID.Value) & ", '" & _
client_IDPassportNumber.Value & "', " & CLng(fk_CountryID.Value) & ", " & CLng(fk_GenderID.Value) & _
", #" & CDate(Format(client_DateOfBirth.Value, "dd/mm/yyyy")) & "#, 35;"
When i run it, it gives me an error stating "Invalid Use Of Null"
I have a form which i use to enter data, some of the fields for example client_IDPassportNumber are not required to be completed and thus can be left out by the user. I want the user to be able to enter nothing and save the value as nothing ( null ) in the table. Required is set to no on the table.
Any help would be appreciated.
I have the following SQL string:
strSql = "INSERT INTO t_ClientDemographics(client_FirstHCTVisitDate, client_ClientCode, client_FirstName, " & _
"client_LastName, fk_EmploymentStatusID, client_ClientEmployee, client_JobTitle, " & _
"fk_IdentificationTypeID, client_IDPassportNumber, fk_CountryID, fk_GenderID, client_DateOfBirth, " & _
"client_Age) SELECT #" & CDate(Format(client_FirstHCTVisitDate.Value, "dd/mm/yyyy")) & "#, '" & _
UCase(strHCTClientCode) & "', '" & LCase(client_FirstName.Value) & "', '" & LCase(client_LastName.Value) & "', " & _
CLng(fk_EmploymentStatusID.Value) & ", '" & LCase(client_ClientEmployee.Value) & "', '" & _
LCase(client_JobTitle.Value) & "', " & CLng(fk_IdentificationTypeID.Value) & ", '" & _
client_IDPassportNumber.Value & "', " & CLng(fk_CountryID.Value) & ", " & CLng(fk_GenderID.Value) & _
", #" & CDate(Format(client_DateOfBirth.Value, "dd/mm/yyyy")) & "#, 35;"
When i run it, it gives me an error stating "Invalid Use Of Null"
I have a form which i use to enter data, some of the fields for example client_IDPassportNumber are not required to be completed and thus can be left out by the user. I want the user to be able to enter nothing and save the value as nothing ( null ) in the table. Required is set to no on the table.
Any help would be appreciated.