W
Wiscow
My code seems to run fine updateing my tables. But when it inserts
the string value for the [Status] field it adds a space before and
after the string, in this case "IN". Not a big deal except that later
when I have a query list all those that are "IN" it doesn't work with
those that are " IN " What is happening?
'building SQL Insert
strSQL = "INSERT INTO ItemHistory ([IDNumber],[Status],[Date]"
If Not IsNull(txtNote) Then
strSQL = strSQL & ",[Discription]"
End If
strSQL = strSQL & ",[Quantity],[Person])"
strSQL = strSQL & "VALUES (" & Me.[Items.IDNumber] & ",'IN',#" &
txtDate & "#"
MsgBox strSQL
If Not IsNull(txtNote) Then
strSQL = strSQL & ",'" & txtNote & "'"
End If
strSQL = strSQL & "," & txtQuanity & ",'" & txtName & "')"
'run SQL
MsgBox strSQL
DoCmd.RunSQL strSQL
the string value for the [Status] field it adds a space before and
after the string, in this case "IN". Not a big deal except that later
when I have a query list all those that are "IN" it doesn't work with
those that are " IN " What is happening?
'building SQL Insert
strSQL = "INSERT INTO ItemHistory ([IDNumber],[Status],[Date]"
If Not IsNull(txtNote) Then
strSQL = strSQL & ",[Discription]"
End If
strSQL = strSQL & ",[Quantity],[Person])"
strSQL = strSQL & "VALUES (" & Me.[Items.IDNumber] & ",'IN',#" &
txtDate & "#"
MsgBox strSQL
If Not IsNull(txtNote) Then
strSQL = strSQL & ",'" & txtNote & "'"
End If
strSQL = strSQL & "," & txtQuanity & ",'" & txtName & "')"
'run SQL
MsgBox strSQL
DoCmd.RunSQL strSQL