Results 1 to 8 of 8
  1. #1
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Command Button (show as 'clicked') (2002 SP-2)

    Might there be some way of showing on a form that a CmdBtn has been clicked? I don't want it to appear as disabled after the click because it may be needed later. This is to resolve an indirectly related problem where an OnClose event ocurrs prior to an AfterUpdate event. If a TxtBox could indicate the action (i.e. "Button has been clicked") that would be great. All input appreciated.
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Command Button (show as 'clicked') (2002 SP-2)

    One possibility is to use a toggle button instead of a command button. A toggle button can be "up" (value = False) or "down" (value = True). If you would prefer to keep the command button, you could put an unbound check box next to it. When the command button is clicked, set the check box to True, i.e. ticked.

  3. #3
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Command Button (show as 'clicked') (2002 SP-2)

    Never done that before. . .(he said while digesting the thought)
    I'm off to see what damage I can do!

    Thanks for the idea!
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  4. #4
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Command Button (show as 'clicked') (2002 SP-2)

    Hmmm. . .

    I may not have posed my question properly. I created a tglbtn, and it work just fine. However, the "depressed" mode only diplays for as long as the form remains open. When I return to the form it looks as if I never pressed it; I need to retain the fact that the msg was sent. I don't know if a Combo Box would work here, but the thought is that I might be able to select "send confirm" or "confirm not sent" (the default) and the frm would retain the choice that was selected (I would know if I had completed that task).
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Command Button (show as 'clicked') (2002 SP-2)

    You will need to add a Yes/No field MsgSent to your table. Set the Control Source of your toggle button to the name of this field. In the first place, when the user clicks the toggle button, the MsgSent field is set to Yes, and in the second place, when the form is opened, and the field is set to Yes, the toggle button will be "down".

  6. #6
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Command Button (show as 'clicked') (2002 SP-2)

    Can I add another suggestion to this thread.

    You can change the caption of a command button in code. So for instance, your button might say "Send Message" until a message has been sent, then say "Send Another Message" .

    The code that sends the message would also change the caption of the button. Also as Hans says, you need a yes/no field "Message sent". This field would also be checked in the "on Current" event and the appropriate caption put in the command button when looking at old data.
    Regards
    John



  7. #7
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Command Button (show as 'clicked') (2002 SP-2)

    John:

    Thanks for your valuable input! Please see <post#=332903>post 332903</post#> for the way I finally addressed this issue.
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  8. #8
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Command Button (show as 'clicked') (2002 SP-2)

    <P ID="edit" class=small>(Edited by bfxtrfcmgr on 20-Jan-04 06:31. Edited to indicate code firing from OnChange event rather than OnLost Focus.)</P>Hans:

    Well, I tried your suggestion (and also incorporated Johns input) and, while the results were acceptable (beauty in the eye of the beholder thing), I ended up going another way. I created a ComboBox bound to the table, removed the tab stop, code fires OnChange, and stuck it up in the corner of the form. In order to draw attention to it if the e-mail has not been sent, I added some conditional formatting. It is hardly noticeable if the e-mail has been sent, but stands out if it hasn't (of primary concern, but I failed to mention in the original post). The "clunkiness" of my design is that you would need to re-set the status to re-send the e-mail, and then change it back. If you have further comments/ideas on this issue I would love to hear them!

    I do thank you both for the input; I would not have arrived at my solution had you not provided the suggestions.
    Attached Images Attached Images
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •