Referring to a control on another form

  • Thread starter pwdpwd via AccessMonster.com
  • Start date
P

pwdpwd via AccessMonster.com

I have a report form which enables 16 different reports; I have managed this
by using 4 different Option Groups, each with 2 buttons - no defaults. A
Command button traps non-selections, contains all the if statements and
executes the relevant report; that works fine.

I thought that it would be useful to allow the user to determine which of the
buttons should be a default. I have built a Parameter Form, arranged another
set of option buttons with another Command button, but when I write the code
to change the default status of one of the original buttons, I can't get it
to work.

I have checked the link that ruralguy posted (thanks, that's great) giving
the format for referring to forms, but cannot get my code to work.

I am using:

Forms!ReportWeekly!Frame286.DefaultValue = 1

but the message that I get is that Access can't find the form ReportWeekly
referred to. I've tried all combinations of using [] around the names and .
instead of ! but all to no avail. The ReportWeekly form is not open when I
am on the Parameter Form.

Any help would be much appreciated
 
J

Jeff Boyce

Bob

If the form isn't open, Access can't find it.

(note -- an alternative to having a combination of option groups to
identify/select a report is to use a combobox that lists them. The
potential issue with the multiple option groups approach is ... what happens
when you add another report? or take one out of service? If I'm
understanding how you're doing this, it is a very maintenance-intensive
approach.)

Good luck!

Regards

Jeff Boyce
Microsoft Access MVO

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
P

pwdpwd via AccessMonster.com

Hi Jeff,

Thanks for this - should have realised about opening the form 'invisibly'
That gets rid of the warning message, but it still wont change the setting.
Perhaps I should look at storing the value in a Table and accessing /editing
the value there. Back to the drawing board!

You're right about the maintenance, but the form does look good, and it will
be onerous to adapt, but that shouldn't be that necessary (he said hopefully!)


Thanks for the help

Jeff said:
Bob

If the form isn't open, Access can't find it.

(note -- an alternative to having a combination of option groups to
identify/select a report is to use a combobox that lists them. The
potential issue with the multiple option groups approach is ... what happens
when you add another report? or take one out of service? If I'm
understanding how you're doing this, it is a very maintenance-intensive
approach.)

Good luck!

Regards

Jeff Boyce
Microsoft Access MVO
I have a report form which enables 16 different reports; I have managed
this
[quoted text clipped - 27 lines]
Any help would be much appreciated
 
J

Jeff Boyce

I offer, in all good faith, "Good Luck!".

(the bumper sticker I'm still looking for is "Maintenance Happens")

Regards

Jeff Boyce
Micrsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

Recordset too large?


pwdpwd via AccessMonster.com said:
Hi Jeff,

Thanks for this - should have realised about opening the form 'invisibly'
That gets rid of the warning message, but it still wont change the
setting.
Perhaps I should look at storing the value in a Table and accessing
/editing
the value there. Back to the drawing board!

You're right about the maintenance, but the form does look good, and it
will
be onerous to adapt, but that shouldn't be that necessary (he said
hopefully!)


Thanks for the help

Jeff said:
Bob

If the form isn't open, Access can't find it.

(note -- an alternative to having a combination of option groups to
identify/select a report is to use a combobox that lists them. The
potential issue with the multiple option groups approach is ... what
happens
when you add another report? or take one out of service? If I'm
understanding how you're doing this, it is a very maintenance-intensive
approach.)

Good luck!

Regards

Jeff Boyce
Microsoft Access MVO
I have a report form which enables 16 different reports; I have managed
this
[quoted text clipped - 27 lines]
Any help would be much appreciated
 

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