Option Button to call up certain Report.......

G

GarryKhoo

Dear All,

Previously I am using combo box to select which data I need to print out the
report such as Customer Record with Status of Active and Blocked. I created a
Macro's that will open a report that Customer Record only with Active status
when I select Active.

Now I try to change the combo box to option box but I don't know why the
report show me "#Error". I think the Macro's now didn't get the value of the
Option Button.

Please help.
 
V

Van T. Dinh

Did you include the selection criteria in the Report RecordSource or the
"wherecondition" argument of the Macro?

Check the Query that you used as the RecordSource for the Report or the
"whercondition" as appropriate. You probably referred to the old Combobox
which need to be changed to the OptionFrame.
 
G

GarryKhoo

Dear Van,

Thanks for your reply.

I create a option group which I created 4 option:

Value
Active 1
Blocked 2
Suspend 3
KIV 4

The wizard will ask me to give value to particular option which only allow
Numeric. Here is where I suspect the value pass to search for my contact is
"1" instead of "Active". In the result, I get "#Error". Please correct me if
wrong.

After created the option group I name it to "ps".

At Macros:

Report Name: Labels Contacts
View: Print Preview
Filter Name:
Where Condition: Forms![Contacts]![ps] = [Contacts]![Status]

The report return me "#Error".

Please help

Thanks

Regards,
Garry Khoo
 
V

Van T. Dinh

Yes, the value of the OptionGroup is always numeric.

--
HTH
Van T. Dinh
MVP (Access)


GarryKhoo said:
Dear Van,

Thanks for your reply.

I create a option group which I created 4 option:

Value
Active 1
Blocked 2
Suspend 3
KIV 4

The wizard will ask me to give value to particular option which only allow
Numeric. Here is where I suspect the value pass to search for my contact
is
"1" instead of "Active". In the result, I get "#Error". Please correct me
if
wrong.

After created the option group I name it to "ps".

At Macros:

Report Name: Labels Contacts
View: Print Preview
Filter Name:
Where Condition: Forms![Contacts]![ps] = [Contacts]![Status]

The report return me "#Error".

Please help

Thanks

Regards,
Garry Khoo

--
Thanks a lot.

Best Regards,
Garry Khoo


Van T. Dinh said:
Did you include the selection criteria in the Report RecordSource or the
"wherecondition" argument of the Macro?

Check the Query that you used as the RecordSource for the Report or the
"whercondition" as appropriate. You probably referred to the old
Combobox
which need to be changed to the OptionFrame.
 
G

GarryKhoo

Dear Van,

I solve the problem by change the Active status to numeric and use combo box
with 2 column for user to select but will store Numeric e.g. 1 as Active into
database.

Now my option group work!!!!!! Thanks ya.

--
Thanks a lot.

Best Regards,
Garry Khoo


Van T. Dinh said:
Yes, the value of the OptionGroup is always numeric.

--
HTH
Van T. Dinh
MVP (Access)


GarryKhoo said:
Dear Van,

Thanks for your reply.

I create a option group which I created 4 option:

Value
Active 1
Blocked 2
Suspend 3
KIV 4

The wizard will ask me to give value to particular option which only allow
Numeric. Here is where I suspect the value pass to search for my contact
is
"1" instead of "Active". In the result, I get "#Error". Please correct me
if
wrong.

After created the option group I name it to "ps".

At Macros:

Report Name: Labels Contacts
View: Print Preview
Filter Name:
Where Condition: Forms![Contacts]![ps] = [Contacts]![Status]

The report return me "#Error".

Please help

Thanks

Regards,
Garry Khoo

--
Thanks a lot.

Best Regards,
Garry Khoo


Van T. Dinh said:
Did you include the selection criteria in the Report RecordSource or the
"wherecondition" argument of the Macro?

Check the Query that you used as the RecordSource for the Report or the
"whercondition" as appropriate. You probably referred to the old
Combobox
which need to be changed to the OptionFrame.

--
HTH
Van T. Dinh
MVP (Access)


Dear All,

Previously I am using combo box to select which data I need to print
out
the
report such as Customer Record with Status of Active and Blocked. I
created a
Macro's that will open a report that Customer Record only with Active
status
when I select Active.

Now I try to change the combo box to option box but I don't know why
the
report show me "#Error". I think the Macro's now didn't get the value
of
the
Option Button.

Please help.

--
Thanks a lot.

Best Regards,
Garry Khoo
 

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