If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Can you mark a command box as already selected?
I was wondering if there was anyway to mark a command box as being selected
once it is clicked. I'm trying to create a training game and I don't want trainees to select the same category twice. |
#2
|
|||
|
|||
Can you mark a command box as already selected?
Try using a Toggle Button, rather than a Command Button. Clicking on a
Toggle Button depresses it, so that you can tell it's already been clicked. You can also put a Static variable in the Click event of the Command Button to keep track of whether it's already been clicked: Private Sub Command0_Click() Static booClicked As Boolean If booClicked = False Then ' put your code that's supposed to happen when you click here booClicked = True Else MsgBox "You've already clicked on the button" End If End Sub -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "jhucks8" wrote in message ... I was wondering if there was anyway to mark a command box as being selected once it is clicked. I'm trying to create a training game and I don't want trainees to select the same category twice. |
#3
|
|||
|
|||
Can you mark a command box as already selected?
Thanks Douglas! That really helps!
"Douglas J Steele" wrote: Try using a Toggle Button, rather than a Command Button. Clicking on a Toggle Button depresses it, so that you can tell it's already been clicked. You can also put a Static variable in the Click event of the Command Button to keep track of whether it's already been clicked: Private Sub Command0_Click() Static booClicked As Boolean If booClicked = False Then ' put your code that's supposed to happen when you click here booClicked = True Else MsgBox "You've already clicked on the button" End If End Sub -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "jhucks8" wrote in message ... I was wondering if there was anyway to mark a command box as being selected once it is clicked. I'm trying to create a training game and I don't want trainees to select the same category twice. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
getting single selected value from listbox | smarty | Using Forms | 12 | March 21st, 2006 06:16 PM |
SET A SUBFORM TO PRINT ONLY SELECTED RECORD IN A FORM | BEE | Using Forms | 1 | June 15th, 2005 08:27 PM |
How can I add only on selected Criteria only? | Donna | General Discussion | 1 | June 13th, 2005 04:19 PM |
list box doesn't store the selected value until closing the form | Lin | Using Forms | 2 | November 3rd, 2004 05:34 PM |
run macro when worksheet is selected | Carl | Worksheet Functions | 4 | October 3rd, 2004 04:29 PM |