Display query result in Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Morning,

Running Access 2002. Have built a form for user to enter a mode, an origin
zip, and destination zip. Form has control button to run a simple query to
return a rate for that shipping lane. I want to display the result of the
query on the form. Have asked internal users, but no assistance available.
The query works and pulls back a result, but how do I get it to display?
Would prefer not to write code (don't know how) but have a user here I can
utilize. Any help MUCH appreciated.
 
Is the form actually displaying different records that are stored in some
table(s) or is it just used to show the calculation?
If the former, you could base your form on your query. That is, include the
fields mode, origin zip, and dest zip in your query, along with the
calculated field, and then use this query as the recordsource for your form.
If the latter, you will probably want to use code. In the OnClick event of
the button, say something like:
me.txtShipRate = me.cmbMode *1.2 +( me.txtDestZip -5) blah blah,
where txtShipRate is the name of the textbox on the form, cmbMode is a combo
box (I'm assuming you use a combo box to choose a mode), etc.
hope this helps
-John
 
Back
Top