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
|
|||
|
|||
button question: two different commands?
Is it at all possible to use the same button for two different commands. I want to make a subform visible and invisible with the same button. |
#2
|
|||
|
|||
button question: two different commands?
Private Sub cmdButton_Click()
frmSubform.Visible = Not frmSubform.Visible End Sub "scubadiver" wrote in message ... Is it at all possible to use the same button for two different commands. I want to make a subform visible and invisible with the same button. |
#3
|
|||
|
|||
button question: two different commands?
I have inserted the following single line Me.ComQry.Visible = Not Me.ComQry.Visible but nothing is happening. "Baz" wrote: Private Sub cmdButton_Click() frmSubform.Visible = Not frmSubform.Visible End Sub "scubadiver" wrote in message ... Is it at all possible to use the same button for two different commands. I want to make a subform visible and invisible with the same button. |
#4
|
|||
|
|||
button question: two different commands?
Inserted it where?
"scubadiver" wrote in message ... I have inserted the following single line Me.ComQry.Visible = Not Me.ComQry.Visible but nothing is happening. "Baz" wrote: Private Sub cmdButton_Click() frmSubform.Visible = Not frmSubform.Visible End Sub "scubadiver" wrote in message ... Is it at all possible to use the same button for two different commands. I want to make a subform visible and invisible with the same button. |
#5
|
|||
|
|||
button question: two different commands?
Private Sub CompQry_Click() Me.ComQry.Visible = Not Me.ComQry.Visible End Sub in the button code on the main form "Baz" wrote: Inserted it where? "scubadiver" wrote in message ... I have inserted the following single line Me.ComQry.Visible = Not Me.ComQry.Visible but nothing is happening. "Baz" wrote: Private Sub cmdButton_Click() frmSubform.Visible = Not frmSubform.Visible End Sub "scubadiver" wrote in message ... Is it at all possible to use the same button for two different commands. I want to make a subform visible and invisible with the same button. |
#6
|
|||
|
|||
button question: two different commands?
Is ComQry the name of the subform control?
In the property sheet for the command button (CompQry?), Event tab, make sure that [Event Procedure] is selected against "On Click". "scubadiver" wrote in message ... Private Sub CompQry_Click() Me.ComQry.Visible = Not Me.ComQry.Visible End Sub in the button code on the main form "Baz" wrote: Inserted it where? "scubadiver" wrote in message ... I have inserted the following single line Me.ComQry.Visible = Not Me.ComQry.Visible but nothing is happening. "Baz" wrote: Private Sub cmdButton_Click() frmSubform.Visible = Not frmSubform.Visible End Sub "scubadiver" wrote in message ... Is it at all possible to use the same button for two different commands. I want to make a subform visible and invisible with the same button. |
#7
|
|||
|
|||
button question: two different commands?
Are CompQry and ComQry two different controls? If so, what is ComQry?
"scubadiver" wrote in message ... Private Sub CompQry_Click() Me.ComQry.Visible = Not Me.ComQry.Visible End Sub in the button code on the main form "Baz" wrote: Inserted it where? "scubadiver" wrote in message ... I have inserted the following single line Me.ComQry.Visible = Not Me.ComQry.Visible but nothing is happening. "Baz" wrote: Private Sub cmdButton_Click() frmSubform.Visible = Not frmSubform.Visible End Sub "scubadiver" wrote in message ... Is it at all possible to use the same button for two different commands. I want to make a subform visible and invisible with the same button. |
#8
|
|||
|
|||
button question: two different commands?
That is correct but still nothing. "Baz" wrote: Is ComQry the name of the subform control? In the property sheet for the command button (CompQry?), Event tab, make sure that [Event Procedure] is selected against "On Click". "scubadiver" wrote in message ... Private Sub CompQry_Click() Me.ComQry.Visible = Not Me.ComQry.Visible End Sub in the button code on the main form "Baz" wrote: Inserted it where? "scubadiver" wrote in message ... I have inserted the following single line Me.ComQry.Visible = Not Me.ComQry.Visible but nothing is happening. "Baz" wrote: Private Sub cmdButton_Click() frmSubform.Visible = Not frmSubform.Visible End Sub "scubadiver" wrote in message ... Is it at all possible to use the same button for two different commands. I want to make a subform visible and invisible with the same button. |
#9
|
|||
|
|||
button question: two different commands?
I appreciate that could be a source of difficulty so I have changed it. The button is called "CompQryButton" and the subform control is called "comqry". The code I now have in the "on click" event is: Private Sub CompQryButton_Click() Me.ComQry.Visible = Not Me.ComQry.Visible End Sub "BruceM" wrote: Are CompQry and ComQry two different controls? If so, what is ComQry? "scubadiver" wrote in message ... Private Sub CompQry_Click() Me.ComQry.Visible = Not Me.ComQry.Visible End Sub in the button code on the main form "Baz" wrote: Inserted it where? "scubadiver" wrote in message ... I have inserted the following single line Me.ComQry.Visible = Not Me.ComQry.Visible but nothing is happening. "Baz" wrote: Private Sub cmdButton_Click() frmSubform.Visible = Not frmSubform.Visible End Sub "scubadiver" wrote in message ... Is it at all possible to use the same button for two different commands. I want to make a subform visible and invisible with the same button. |
#10
|
|||
|
|||
button question: two different commands?
Set a breakpoint in the event procedure to find out if it is actually
running when you click the button. "scubadiver" wrote in message ... I appreciate that could be a source of difficulty so I have changed it. The button is called "CompQryButton" and the subform control is called "comqry". The code I now have in the "on click" event is: Private Sub CompQryButton_Click() Me.ComQry.Visible = Not Me.ComQry.Visible End Sub "BruceM" wrote: Are CompQry and ComQry two different controls? If so, what is ComQry? "scubadiver" wrote in message ... Private Sub CompQry_Click() Me.ComQry.Visible = Not Me.ComQry.Visible End Sub in the button code on the main form "Baz" wrote: Inserted it where? "scubadiver" wrote in message ... I have inserted the following single line Me.ComQry.Visible = Not Me.ComQry.Visible but nothing is happening. "Baz" wrote: Private Sub cmdButton_Click() frmSubform.Visible = Not frmSubform.Visible End Sub "scubadiver" wrote in message ... Is it at all possible to use the same button for two different commands. I want to make a subform visible and invisible with the same button. |
Thread Tools | |
Display Modes | |
|
|