Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visibile Property

Status
Not open for further replies.

caykamanj1966

Technical User
Jun 23, 2013
45
US
I have a continuous form.

When that form is opened, I have the following code on the "OnLoad" event:

Code:
Me.paste_hyperlinkNow.Visible = False
Me.Command88.Visible = False

I don't want those objects to show when the form is opened and yes I know I have to rename the command button:)

Then on each record on the continuous form I have the below items, which you will notice some on the "OnCurrent" event:

chk_yesHyper
paste_hyperlink
Command88

So if I check the box for chk_yesHyper, then I want paste_hyperlink and Command88 to be visible, but if chk_yesHyper is not checked, then I want paste_hyperlink and Command88 to be invisible. The below is the code on chk_yesHyper "AfterUpdate" event:

Code:
If Me.yes_hyper.Value = True Then
Me.paste_hyperlinkNow.Visible = True
Me.Command88.Visible = True

Else

If Me.yes_hyper.Value = False Then
Me.paste_hyperlinkNow.Visible = False
Me.Command88.Visible = False

End If

The code above works well, but the only problem is if I check or uncheck yes_hyper, then does the action for all the records.

I just want it to do this on the current record I am working on. I do not want it to show the action I take for all records.

Can someone help me with this?

Thanks in advance!
 
Not the answer to your issue, but your code you have shown here may be simple 2 lines:
Code:
Me.paste_hyperlinkNow.Visible = Me.yes_hyper.Value
Me.Command88.Visible = Me.yes_hyper.Value

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
Thanks for that suggestion. I will do that.

Do you have any idea how I would accomplish my question?
 
In a continuous form, if you want the format of controls of one record to be different from the format of other records, you will need to use conditional formatting. I don't believe Visible is available in conditional formatting so you would need to choose Enabled or possibly change the color.
ConditionalFormatting_yxr971.jpg


Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top