Problem with
[po]![subfrmpoinv]![amount]
I get an error
How should it be written?
thanks
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],
[po]![subfrmpoinv]![amount]
I get an error
How should it be written?
thanks
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
& "[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