Enable control with Macro? (1 Viewer)

flavi

Avg Access Guy
Local time
Today, 01:16
Joined
Jun 16, 2008
Messages
14
hello

I have a switchboard that has 3 buttons.
New PO - Opens frmMAIN in Add Mode
Edit PO - Opens frmMAIN in Edit Mode
Close PO - Opens frmMAIN in Edit Mode, but here is my dilemna.

(frmMAIN has a hidden control fldCLOSED where visible is set to false when form loads)

When the user clicks "close PO", I want it to be able to open frmMAIN in edit mode, but then a field called fldCLOSED appears(i.e. visible) and it only happens when "Close PO" is clicked.

I am looking at using the Action in a Macro called RunCode, but I do not understand how to get it to run the code. I have the code on the form as shown below:

Code:
Private Function closepo()
Me.fldCLOSED.Visible = True
End Function

Does anyone have any ideas on how to get this to work? i appreciate any help in advance.

Thanks,

Brad
 

flavi

Avg Access Guy
Local time
Today, 01:16
Joined
Jun 16, 2008
Messages
14
I found my answer. Amazing what the brain doesn't comprehend so early in the morning.

I used the macro line "SetProperty" selected the object, and set visible = -1 and it worked fine.

=)
 

Users who are viewing this thread

Top Bottom