Need a way to make a button do one of two different things

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need an elegant way to allow a command button do one of two different things, ideally taking up the least amount of screen space as possible
My print and email buttons need to show either a summary or full details. The summary will be the default. I rejected option buttons and a caption that toggles as I have no space in my form header where the buttons are. The other complication is that the email button is invisible for some users
 
You need something that will determine which functionality should be used
for any given button click. Once you decide what that will be, there are a
few options.

1) You can put 2 buttons in the same location on the form and hide/unhide
them as needed. The visible button is the one the user will be able to
click.

2) You can change the caption on the button as needed and use an
If..Then..Else statement in the Click event to determine which option to
run.

--
Wayne Morgan
Microsoft Access MVP


David said:
I need an elegant way to allow a command button do one of two different
things, ideally taking up the least amount of screen space as possible.
My print and email buttons need to show either a summary or full details.
The summary will be the default. I rejected option buttons and a caption
that toggles as I have no space in my form header where the buttons are. The
other complication is that the email button is invisible for some users.
 
There is also a control called a toggle, which will do this. But I never
could decide whether it was least confusing to show a caption on it which
described its current state, or the state it was going to change to after
you toggled it.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
David said:
I need an elegant way to allow a command button do one of two different
things, ideally taking up the least amount of screen space as possible.
My print and email buttons need to show either a summary or full details.
The summary will be the default. I rejected option buttons and a caption
that toggles as I have no space in my form header where the buttons are. The
other complication is that the email button is invisible for some users.
 
I usually just prove a check box on the same form. If the check box is
checked..tent he details of the report show.

In fact, often, I can use the SAME report..and simply toggle the .visible
property of the report when it loads to show the details..or not.

Here is some screen shots of some sub-form screens..and note have several
of them have a 'include' details button.

http://www.attcanada.net/~kallal.msn/Articles/fog0000000005.html

And, here is some more screen shots of report prompt screens, some for
example have a 'preview' optiion..and again this saves buttions on the
screen.

http://www.attcanada.net/~kallal.msn/ridesrpt/ridesrpt.html
 
Back
Top