G
Guest
Hi,
I have a form based on a table called Quotes when the user changes the
status field on the form to Order, I would like to insert a new record into
the Order table. My key field on the Order table is QuoteNum. This is the
code I have now which I based on postings from this newsgroup. The code is
not inserting anything into the Order table.
Any help is appreciated.
Thank you,
Karen
Private Sub QuoteStatus_Change()
If QuoteStatus.Value = "2" Then
strSQL = "INSERT INTO Order (CustomerID, JobName, QuoteNum, ManufacturerID,
Notes)"
strSQL = strSQL & "VALUES ( " & [Forms]!
I have a form based on a table called Quotes when the user changes the
status field on the form to Order, I would like to insert a new record into
the Order table. My key field on the Order table is QuoteNum. This is the
code I have now which I based on postings from this newsgroup. The code is
not inserting anything into the Order table.
Any help is appreciated.
Thank you,
Karen
Private Sub QuoteStatus_Change()
If QuoteStatus.Value = "2" Then
strSQL = "INSERT INTO Order (CustomerID, JobName, QuoteNum, ManufacturerID,
Notes)"
strSQL = strSQL & "VALUES ( " & [Forms]!
![CustomerID].Value
strSQL = strSQL & ", " & [Forms]!![JobName].Value
strSQL = strSQL & ", " & [Forms]!![QuoteNum].Value
strSQL = strSQL & ", " & [Forms]!![ManufacturerID].Value
strSQL = strSQL & ", " & [Forms]!![Notes].Value
strSQL = strSQL & ") "
End If
End Sub