G
Guest
Dear All,
I have an Access application which could be run on Access or SQL Server as a
backend. I need to clear a value of a text box, so I set Me.txtStudentID =
Null. That is fine in Access but it generate an error in SQL Server, try to
assign a Null to a variable not variant type. I change the code to
Me.txtStudentID = "". This time it works fine in SQL Server, but it generates
an error in Access, "Field 'STUDENT.NAME' cannot be a zero-length string."
I do not know which value I should set to that text box so it will be OK in
Access and SQL Server. Please, give me some advice.
Thank you.
I have an Access application which could be run on Access or SQL Server as a
backend. I need to clear a value of a text box, so I set Me.txtStudentID =
Null. That is fine in Access but it generate an error in SQL Server, try to
assign a Null to a variable not variant type. I change the code to
Me.txtStudentID = "". This time it works fine in SQL Server, but it generates
an error in Access, "Field 'STUDENT.NAME' cannot be a zero-length string."
I do not know which value I should set to that text box so it will be OK in
Access and SQL Server. Please, give me some advice.
Thank you.