sql sub form problem in event

ggreg

Registered User.
Local time
Today, 13:55
Joined
Aug 12, 2002
Messages
66
Look below in Privat sub Reviewed_Click()

I am getting an error at

"[po]![subfrmpoinv]![amount]

Po is the form ....subfrmpoinv is the sub form and amount is the field name.

Can someone tell me what I am doing wrong





Private Sub Reviewed_Click()
On Error GoTo Err_Reviewed_Click

Dim SQL_Text As String
Dim msg, response, mystring
msg = "Are you sure the Req is ready Upload ?"
response = MsgBox(msg, vbYesNo)
If response = vbYes Then ' User chose Yes.
SQL_Text = "INSERT INTO rq_requisition ([Description], [Price], [Object],
," _
& "[Department], [Product], [Project], [Comments]) VALUES(Description1 & Description2," _
& "[po]![subfrmpoinv]![amount], Obj, center, Orgn, Actv, ""800"" & Project__ & ""0000"", FH__)"
DoCmd.RunSQL (SQL_Text)
Else ' User chose No.
mystring = "No" ' Perform some action.
End If


Exit_Reviewed_Click:
Exit Sub

Err_Reviewed_Click:
MsgBox Err.Description
Resume Exit_Reviewed_Click

End Sub​
 

Users who are viewing this thread

Back
Top Bottom