what do I add to my macro to include details from a check box??

J

jo

Hi I have a print dialog that has a group option that the user can select
either "All Depts" or "Select a Dept", when the "Select Dept" is selected a
List box display the selection of Depts. But the user would like to select
Inactive box that will only the Inactive records. I have put the check box
outside the Group Option area but I do do know wot to put into the macro to
include this check box into the inquation?
Can any one help please??
Jo
 
J

jo

Hi I have managed to get part of my macro to work where the user just selects
All dept by adding to the Where Condition:
IIf([Forms]![Print Gauge List Dialog]![Not
Active]=True,[GaugeInfo]![NotInUse]=True,[GaugeInfo]![NotInUse]=False)
But in the 2nd part where the user selects a dept I already have in the
Where Condition:
=IIf([Forms]![Print Gauge List Dialog]![Select Dept] Is
Null,"","[Department]=Forms![Print Gauge List Dialog]![Select Dept]")
Does any one know how I can put the two conditions together please???
thanks Jo
 
S

Steve Schapel

Jo,

What are the Action(s) in your macro? On what Event does the macro run?

--
Steve Schapel, Microsoft Access MVP


jo said:
Hi I have managed to get part of my macro to work where the user just
selects
All dept by adding to the Where Condition:
IIf([Forms]![Print Gauge List Dialog]![Not
Active]=True,[GaugeInfo]![NotInUse]=True,[GaugeInfo]![NotInUse]=False)
But in the 2nd part where the user selects a dept I already have in the
Where Condition:
=IIf([Forms]![Print Gauge List Dialog]![Select Dept] Is
Null,"","[Department]=Forms![Print Gauge List Dialog]![Select Dept]")
Does any one know how I can put the two conditions together please???
thanks Jo
jo said:
Hi I have a print dialog that has a group option that the user can select
either "All Depts" or "Select a Dept", when the "Select Dept" is selected
a
List box display the selection of Depts. But the user would like to
select
Inactive box that will only the Inactive records. I have put the check
box
outside the Group Option area but I do do know wot to put into the macro
to
include this check box into the inquation?
Can any one help please??
Jo



__________ Information from ESET Smart Security, version of virus signature database 4139 (20090608) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
J

jo

Hi Steve I have a print dialog that has a group option that the user can
select
either "All Depts" or "Select a Dept", when the "Select Dept" is selected a
List box display the selection of Depts. But the user now would like to
select an
Inactive box (Check Box) that will select only the Inactive records. I have
put the check box
outside the Group Option area. There is a Preview button and a Print Button
and Close button and the group macro is attached to the Print dialog On Open
Event. The Where Condition that I put in for the All Depts woks good but I'm
not sure how to join the two conditions as mention in the previous post??
Jo
Steve Schapel said:
Jo,

What are the Action(s) in your macro? On what Event does the macro run?

--
Steve Schapel, Microsoft Access MVP


jo said:
Hi I have managed to get part of my macro to work where the user just
selects
All dept by adding to the Where Condition:
IIf([Forms]![Print Gauge List Dialog]![Not
Active]=True,[GaugeInfo]![NotInUse]=True,[GaugeInfo]![NotInUse]=False)
But in the 2nd part where the user selects a dept I already have in the
Where Condition:
=IIf([Forms]![Print Gauge List Dialog]![Select Dept] Is
Null,"","[Department]=Forms![Print Gauge List Dialog]![Select Dept]")
Does any one know how I can put the two conditions together please???
thanks Jo
jo said:
Hi I have a print dialog that has a group option that the user can select
either "All Depts" or "Select a Dept", when the "Select Dept" is selected
a
List box display the selection of Depts. But the user would like to
select
Inactive box that will only the Inactive records. I have put the check
box
outside the Group Option area but I do do know wot to put into the macro
to
include this check box into the inquation?
Can any one help please??
Jo



__________ Information from ESET Smart Security, version of virus signature database 4139 (20090608) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
S

Steve Schapel

Jo,

Aha! So are we talking about an OpenReport action in your macro?

It would probably be better to just put the references to the selected
controls in the Criteria of the query that the report is based on. Assuming
we are talking about a report, which so far I am just guessing about.

Also, I can't understand why you have a macro on the Open event of the form.
That means the macro is running before the selections are made in the
listbox and checkbox?

--
Steve Schapel, Microsoft Access MVP


jo said:
Hi Steve I have a print dialog that has a group option that the user can
select
either "All Depts" or "Select a Dept", when the "Select Dept" is selected
a
List box display the selection of Depts. But the user now would like to
select an
Inactive box (Check Box) that will select only the Inactive records. I
have
put the check box
outside the Group Option area. There is a Preview button and a Print
Button
and Close button and the group macro is attached to the Print dialog On
Open
Event. The Where Condition that I put in for the All Depts woks good but
I'm
not sure how to join the two conditions as mention in the previous post??
Jo



__________ Information from ESET Smart Security, version of virus signature database 4142 (20090609) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

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