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

Update Query Based on Form Entry

Status
Not open for further replies.

brahmabull525

Programmer
Jul 19, 2004
33
US

I have a form called XYZ that has a text box called Text1. I want to enter a value in Text1, then hit a command button that will start an update query. In the update query, the Text1 value is multiplied by a table field called Price and output in a field called Sale.

How is this accomplished? Please help!
 
Something like this in the Click event procedure of the button ?
If IsNumeric(Me!Text1) Then
DoCmd.RunSQL "UPDATE yourTable SET Sale=Price * " & Me!Text1 _
& " WHERE yourCriteriaHere"
End If

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