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

How to store field value in variable?

Status
Not open for further replies.

kellstee

Technical User
Dec 31, 2005
37
US
Sorry, I know this is the most basic question and I've spent hours searching. I must just be using the wrong search criteria or the explanations are over my head.

I have a value in a one-row table that I divide by the number of days in the current month. I need this value often for other query calculations. Am I able to just store this calculated value in a variable and then call it in my queries when I need it?

If so, how do I do this?

Thanks in advance!
Kelly
 
In JetSQL there is no variables but parameters.
Store you calculated value in a textbox and reference it in your queries:
[Forms]![name of mainform]![name of textbox]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for the replies. When I put the value in a form, the query only seems to recognize the form field when the form is open. Is this expected behavior?

Thanks again!
 
Yes, it is.

You can use DlookUp to get a value from a table, whether it is open or not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top