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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

click event sql problem with sub form

Status
Not open for further replies.

ggreg

Programmer
Mar 9, 2001
201
US
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],
," _
& "[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​
 
how are ya ggreg . . .

try:
Code:
[blue][subfrmpoinv].Form![amount][/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top