Forms with values from seperate queries.

  • Thread starter Thread starter boomtap
  • Start date Start date
B

boomtap

I have a form built off a query. I would like to include some information
from other queries that run from values on the form. Is it possible to run a
sub-query of some sort without having to create a sub form?
 
DLookup(), DMax(),... are similar to subqueries that return a single value.
You can also use code to pull values from other tables.
 
I can't seem to get it to work. I want to grab one piece of information from
a query (it only has one row and one column). Do they have to be related
somehow?
 
They don't have to be related. Can you provide:
-the expression you tried
-the name of the query
-the field name in the query
 
I managed to make it work - thanks for your help. I have another question
though. Is there an expression simular to the IIF expression that can be
used in a form. I have some fields that are blank that I would like to have
a "0" value if not populated with anything else.

Duane said:
They don't have to be related. Can you provide:
-the expression you tried
-the name of the query
-the field name in the query
I can't seem to get it to work. I want to grab one piece of information
from
[quoted text clipped - 9 lines]
 
"have a '0'" could have several meanings. If you only want to display 0
where there is no value and the bound field is numeric, use the Format
property of the text box. Check Help for "Format Numeric" for specifics.

--
Duane Hookom
MS Access MVP

boomtap via AccessMonster.com said:
I managed to make it work - thanks for your help. I have another question
though. Is there an expression simular to the IIF expression that can be
used in a form. I have some fields that are blank that I would like to
have
a "0" value if not populated with anything else.

Duane said:
They don't have to be related. Can you provide:
-the expression you tried
-the name of the query
-the field name in the query
I can't seem to get it to work. I want to grab one piece of information
from
[quoted text clipped - 9 lines]
run a
sub-query of some sort without having to create a sub form?
 
For example: IIF([deductions]=10,[deductions10],"0") Is there anything like
that I could use in a form?

Duane said:
"have a '0'" could have several meanings. If you only want to display 0
where there is no value and the bound field is numeric, use the Format
property of the text box. Check Help for "Format Numeric" for specifics.
I managed to make it work - thanks for your help. I have another question
though. Is there an expression simular to the IIF expression that can be
[quoted text clipped - 11 lines]
 
I'm not sure how "some fields that are blank" relates to "[deductions]=10"?
Are you asking the same question or am I aiming at a moving target?

I don't know why you could use the exact expression that you asked other
than I'm not sure if you really want to return the string "0" rather than
the number 0. Do you understand the difference between expressions
evaluating to either text or numbers?
--
Duane Hookom
MS Access MVP

boomtap via AccessMonster.com said:
For example: IIF([deductions]=10,[deductions10],"0") Is there anything
like
that I could use in a form?

Duane said:
"have a '0'" could have several meanings. If you only want to display 0
where there is no value and the bound field is numeric, use the Format
property of the text box. Check Help for "Format Numeric" for specifics.
I managed to make it work - thanks for your help. I have another
question
though. Is there an expression simular to the IIF expression that can
be
[quoted text clipped - 11 lines]
run a
sub-query of some sort without having to create a sub form?
 
Back
Top