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

"Enter parameter value" input box when running SQL statement

Status
Not open for further replies.

swk003

IS-IT--Management
Feb 10, 2004
86
GB
I am trying to run this update query and keep getting the "Enter parameter value" input box when i try and add text data. The updating works fine with numeric data type but not with text type data. The database field is set to text type but still no luck. If I go to the query
design window I can build and run a query based on the same parameters and update the field without any problems (no input box popping up) regardless of data type. I am wondering how I can get around it. Any ideas? here's the procedure:

Private Sub Command67_DblClick(Cancel As Integer)

DoCmd.RunSQL "UPDATE tbl_Validation_data SET [AbbotBoxNumber]=(" & Me.txt_AbbotBoxNumber & ") WHERE RGCBoxNumber=(" & Me.txt_RGC_BoxNumber_unbound & ")"

End Sub

thanks
 
Try this:
Code:
DoCmd.RunSQL "UPDATE tbl_Validation_data SET [AbbotBoxNumber]='" & Me.txt_AbbotBoxNumber & "' WHERE RGCBoxNumber='" & Me.txt_RGC_BoxNumber_unbound & "'"
If they're are text fields/value you need to enclose them in quotes.

[pc2]
 
Hi mp9

I get a data type mismatch in criteria expression when I put quotes where you have suggested. Are the quotes in the correct places?
 
keep getting the "Enter parameter value" input box
And what is the name of the asked parameter ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi PHV

the name of the parameter box is the same as the text within Me.txt_AbbotBoxNumber that I am attempting to update to the table, uncanny!!!
 
So, is this text an acceptable number for AbbotBoxNumber ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
And this ?
DoCmd.RunSQL "UPDATE tbl_Validation_data SET AbbotBoxNumber=" & Me.txt_AbbotBoxNumber & " WHERE RGCBoxNumber=" & Me.txt_RGC_BoxNumber_unbound

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top