Query value won't show up in Form

I

Iowa Joe

I have a query that adds up "Release Quantities" and subtracts them from an
"Initial Hold Quantity". I want the user to see how many "Holds" there are
currently, but for some reason I cannot get this information displayed on my
form. Does anyone have any ideas/suggestions/tips about using queries within
a form? Any help is greatly appreciated. Thanks.
 
P

Perry

Look following function up in Access help:
DSum()
DLookUp()
DMax()
DCount()

Use the one appropriate to yr situation. That would either be DLookUp or
DSum, I presume.
and use this function in the ControlSource property of a TextBox on yr form.
Use the parameters as indicated in help.

Krgrds,
Perry
 
J

Jeff Boyce

Can you get a query to return the values that you want? How are you
defining "how many 'Holds' there are"?

When you say you can't get it to display on your form, does that mean the
query actually returns the value, but the form doesn't let you add a control
to display the query value?

More info, please!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I

Iowa Joe

Hey, sorry about the vague question. Yeah, I can get the query to return the
values I want. The query returns a primary key for the 'Holds' data and the
current value corresponding to that key (which has been reduced several
times).
For the holds, I have a table (which gets its records from a form) that
includes a field for hold quantity (which is gradually reduced as some are
released).

So, all-in-all, the query does return a value for each hold ID that has had
some units released. However, I am unable to get the form to show the current
hold quantity (from the query) for the selected hold ID. Note, the hold ID is
selected in the form using a combo box.

Thanks again
 
J

Jeff Boyce

Without seeing the query's SQL statement (and/or having a better idea of the
actual fields/contents of your table(s)), I'm hard-pressed to figure out
what's going on.

And it sounds like you are saying that the query DOES return what you
expect, but when you base your form on that query (you have
checked/confirmed it is THAT query, right?), you are not able to add the
field from the query to your form in design view. About that I have no
clue!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top