Hide Button

fenhow

Registered User.
Local time
Yesterday, 18:30
Joined
Jul 21, 2004
Messages
599
Hi, I have a form that has a button that allows the user to print a report.
It is a continuous form that uses tabs.

I have a button that says "Approve" when someone selects this button a msgbox pops up and asks for a password, if the password is correct the "Print Button" becomes enabled.

This works great except it enables the button for all the records, not just the one I want.

Is there anyway around this?

Thanks.
Fen How
 
You would need to use conditional formatting, but unfortunately buttons do not have conditional formatting

a couple of alternative suggestions
why have a print button anyway? if a record is 'approved', why not just print after approval? perhaps change the caption on your approve button to 'Approve and Print' and another 'Approve, don't print'.

instead of a 'print' button, use a textbox which does utilise conditional formatting - you can make it look like a button with background and borders.

Assuming when the correct password has been entered some code updates the record with some sort of 'approved' flag, you could then apply conditional formatting to the 'text button' based on this flag - something like for a boolean flag

expression is....[approvedflag]=true

or for a text flag (i.e. name of approver)

expression is....len([approvedflag])>0
 
Perfect solution. Many thanks.
Fen
 

Users who are viewing this thread

Back
Top Bottom