Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax for an empty string in SQL 1

Status
Not open for further replies.

SteveCarrier

Programmer
Aug 6, 2002
34
CA
Hello.

I have a field in a table which I want to clear at the start of a subroutine. The routine goes through a loop and keeps adding different strings to the field until the end of the recordset. The table must be updated to clear the field before going through the loop, however.

This is my SQL:

strSQL = "UPDATE tblProduct SET [tblProduct].[prdBOM] = '" & " " & "' WHERE [tblProduct].prdItemNo = '" & Me.cboAppend & "';"

As you see right now I am using " " as the empty string, which contains a space, which is throwing off my spacing.

I have tried "" which results in an error.
I have also tried "''" which results in an error.

Any suggestions?

Thanks in advance.

Steve Carrier
 
Try...

strSQL = "UPDATE tblProduct SET [tblProduct].[prdBOM] = Null WHERE [tblProduct].prdItemNo = '" & Me.cboAppend & "';"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top