Command Button .Visible (1 Viewer)

Rayhogan

Registered User.
Local time
Today, 14:41
Joined
May 8, 2011
Messages
16
Hi all,
I have a Form on which I have 3 Command Buttons (1) cmdPrintReport (2) cmdNextRecord (3) cmdCloseForm.
I have set both cmdNextRecord and cmdCloseForm to Visible = No and have on Exit from cmdPrintReport

Private Sub cmdPrintReport_Exit(Cancel As Integer)
Me.cmdNextRecord.Visible = True
Me.cmdCloseForm.Visible = True
End Sub

How do I make change both Buttons to .Visible=False on exit for either?
Thanking you
Rayhogan
 

Ranman256

Well-known member
Local time
Today, 09:41
Joined
Apr 9, 2015
Messages
4,337
if youre exiting the form,why do you care if the button is visible?
the form is closing anyway.

why would make next record buttons, when it already exists at the bottom of the form. Theyre free.
and why would you hide them?
 

Rayhogan

Registered User.
Local time
Today, 14:41
Joined
May 8, 2011
Messages
16
Thanks Ranman256.
The Form is a little populated and its mostly for looks. You are correct if I choose to select cmdCloseForm, but would like to have if I choose cmdNextRecord.
Thanking you
Rayhogan
 

Ranman256

Well-known member
Local time
Today, 09:41
Joined
Apr 9, 2015
Messages
4,337
then the NEXT RECORD would never need to be invisible.
you always have other records , right?
 

Rayhogan

Registered User.
Local time
Today, 14:41
Joined
May 8, 2011
Messages
16
Thanks Ranman256,
Firstly, I don't understand your "other records",
I was proposing to stack the cmdNextRecord on cmdPrintReport, but I must now interpret that what I had originally planned is not that easy?
Thanking you
Rayhogan
 

mjdemaris

Working on it...
Local time
Today, 06:41
Joined
Jul 9, 2015
Messages
426
@Ray:
Could you post a picture of the form?
What is the purpose of the form?
What is the purpose of closing the form when clicking on PrintReport?
What do you mean by "stack" the two buttons - maybe putting on top of the other, and having one visible at a time?
Does this mean that when you open the form, only one option is available? How would you access the other button?

Mike
 

Rayhogan

Registered User.
Local time
Today, 14:41
Joined
May 8, 2011
Messages
16
mjdemaris thank you for your response.

I am trying to develop a Form for the entry of members to a club.
The Form is required to search for the member whereby I use a QBR query which when a wildcard is used will show a number of possible member. Then I select the ID of the required member and then the Form will show the details of this members previous records, select the associated Invoice and make a number of entries like Subscription, Levy etc.
I then want to print an Invoice and or make another entry for another member or close the Form when I have completed all my entries. The database will have a few hundred members and will be growing each year as members leave and new members join.
As you will appreciate, the Form will be quite populated and I was thinking of stacking the cmdPrintReport and cmdNextRecord as when I print Invoice I will either be going to next record or closing the Form.

Hope this makes sense as its just my thinking at this time and would appreciate any inputs.
Thanking you
Rayhogan
 

Users who are viewing this thread

Top Bottom