Updating Check Box In Report Not Working

G

Guest

Hello,

I have a check box in my report called "target".

My report is based off of a query called "current order" that retrieves
orders from a table called "requests" by using an order number.

The "current order" table has a yes/no column called "tanks" and a text
column titled "Target/Adjacent"

My check box's control source is a query called TEST SUM:

SELECT DISTINCTROW IIf(Sum([Tanks])<0,-1,0) AS TorF
FROM CURRENT_ORDER
WHERE (((CURRENT_ORDER.[Target/Adjacent])="target"));

The TorF column that this query generates is basically telling the check box
to be checked off if there are any yes's in the table underneath the "Tanks"
column and where the row is a "Target"

It is also telling the check box to stay unchecked if there are no yes's
underneath "Tanks" and where the row is a "Target".

When I run the report I am asked to Enter A Paramater Value for TEST SUM. I
am not sure what it is asking for and I have typed in numerous things as well
as left it blank and the box does not return the correct value it just
remains greyed out everytime.

How can I make this check box return the value I want!?!?

Hope this makes sense and thanks for any advice you can offer!!!
 
G

Guest

Try the following in the control source.

DMin("[Tanks]","CURRENT_ORDER", "[Target/Adjacent]='target'")

Watch out for the single and double ticks combination around 'target'.

Also it will produce a Null if there isn't a 'target' record.
 
G

Guest

Thanks alot Jerry it worked perfectly!!

Not that its going to happen often, but how would you suggest handling a
null situation.

In other words what can I type in to avoid the dreaded greyed out check box
when there is no target records?

Jerry Whittle said:
Try the following in the control source.

DMin("[Tanks]","CURRENT_ORDER", "[Target/Adjacent]='target'")

Watch out for the single and double ticks combination around 'target'.

Also it will produce a Null if there isn't a 'target' record.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

Oarageous said:
Hello,

I have a check box in my report called "target".

My report is based off of a query called "current order" that retrieves
orders from a table called "requests" by using an order number.

The "current order" table has a yes/no column called "tanks" and a text
column titled "Target/Adjacent"

My check box's control source is a query called TEST SUM:

SELECT DISTINCTROW IIf(Sum([Tanks])<0,-1,0) AS TorF
FROM CURRENT_ORDER
WHERE (((CURRENT_ORDER.[Target/Adjacent])="target"));

The TorF column that this query generates is basically telling the check box
to be checked off if there are any yes's in the table underneath the "Tanks"
column and where the row is a "Target"

It is also telling the check box to stay unchecked if there are no yes's
underneath "Tanks" and where the row is a "Target".

When I run the report I am asked to Enter A Paramater Value for TEST SUM. I
am not sure what it is asking for and I have typed in numerous things as well
as left it blank and the box does not return the correct value it just
remains greyed out everytime.

How can I make this check box return the value I want!?!?

Hope this makes sense and thanks for any advice you can offer!!!
 

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

Similar Threads

Update Check Box With IIF From Two Fields 2
display data in report 1
sum of check box 2
SUMIF In Report 1
IIF statement not working 4
Query linked to a check box? 2
Check Box 6
Sum Check Box 5

Top