LSMConsulting's show / hide command button continuous form solution!

hey guys!

this question has been asked a lot BUT recently i read LSMConsulting's solution on how to show or hide the command button and i thought it was really cool but when i tried it i couldn't get it to work.

here's his solution
This is working correctly for continuous forms. A continuous form is simply the SAME form repeated over and over again with different data. The controls are all the SAME control, and unless those controls are BOUND to a ControlSource, they will behave as a group.

The only way to do this is to add a Field to the table that's driving your continuous form, and use that field to show/hide your button. For example, add a field named "bShow" and set the Default value to False. Then, when a user enters a note, set this value to True.

In the Current event of the form, you can do this:

Me.YourNotesButton.Visible = Me.bShow

Or you may be able to use Conditional Formatting to do this ... use the Expression argument.

i'm refering to the Current event solution.

when my current record in my continuous form is Me.bShow = True, then ALL the command buttons in the continuous button is suddenly shown. then when i click to another record, ALL the command buttons are hidden.

to me, i think this is the expect behaviour based on all my readings.

because like what one of the MVPs said, even though in a continuous form with 20 records there might look like there are 20 command buttons, there is only 1 actually. so if you hide it, you hide all.

so am i implementing LSMConsulting's solution correctly or is there something i'm doing wrong that is cause ALL the controls to be shown / hidden instead of one? thanks guys!! = ))
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can't show a button (or other unbound control) in one row but not the others.  My understanding is that LSMs idea is to use a bound control such as a text box formatted to look like a button and use conditional formatting (colors, since conditional formatting doesnt affect the visible property) to show/ hide it on a per row basis.
Dale FyeCommented:
I always put the command buttons associated with a continuous form in the forms footer.  The closest I've ever come to putting a button in the details section and "hiding" it for those records that do not have the focus is in the attached.

In Form 1, I simply change the value of the [ButtonCaption] field in my table and use contditional formatting to change the backcolor of the textbox (button) of the record which has the focus.  You cannot see the "button" on the other records, but if you mouse over it, you will see the cursor change from the pointer to the |.

In Form 2, I actually disable the "buttons" as the default, and enable the one on the current record.  But when you disable the control, its border becomes visible, so you still see it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
developingprogrammerAuthor Commented:
hi mbizup! hi fyed! thanks for your kind help!! = ))

i see guys, yup i guess using a textbox is the only way cause then it's on a per record basis instead of a entire form basis.

fyed thanks for helping me with a demo database!! = ))

i played around with it and before that also read quite a few articles on the net about this.

i've got an addition to make and hopefully you might find it helpful too! = )

i find that when i mouse over the "button" that we created using a textbox, the mousepointer doesn't change. of course we can use the mousemove event but then we need another rectangle to encompass it to change the mousepointer back.

SO! wait for it..... i've added.... the.... Is Hyperlink option!! haha = )

that way we can use whatever formatting we want and the mouse pointer also changes to the hand icon = )

however in the end factoring in how users are trained by the environment nowadays, i decided to just go with the hyperlink instead of the artificial "button" because without the 3D effect and the button highlight upon mouseover (and also not wanting to make every record look like its go a phantom button), i find that for users it would be more intuitive to click on a hyperlink = )

thanks guys!! = ))
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.