Enabling Control from Switchboard

mohammadagul

PrinceAtif
Local time
Today, 19:59
Joined
Mar 14, 2004
Messages
298
hi,

i have an invoiceform with an subform. In the Subform i have two combo boxes In one combo box(cbProduct) i have the value for products to be sold. in the other one i also have the same things but with different SalesPrice and Purchae Price. I was wondring that is itpossible that in my startup form or in my switchboard i plase a checkbox of button which should enable or disable anyone of these combobox.

supposingly i want only cbProduct to be shown in the subform for the rest of the week, i just click the checkbox in my switchboard and this cbproduct combox shall be visible always when i open the form.

Is is possible , if yes then please tell mehow to do it.
 
i posted this question couple of days back but got no reply. Stilll looking for a Reply. Anyone
 
If you SwitchBoard remains open you can add a check box (called CheckBox) to that from, then in the on Load event of the Subform add code like:

If Forms![SwitchBoard]![CheckBox] = True Then
cbProducts.Visible = True
Else cbProducts.Visible = False
End If

Since your using a checkbox you may be able simply this to :

cbProducts.Visible = Forms![SwitchBoard]![CheckBox]
 
sdebo2 -

Your idea will work only if the application is left open all of the time (i.e. never shutdown and computer is never shut down)

mohammad -

What I assume your trying to do is set a control variable where even if the app is closed and reopened the last setting for the control will still be in tack - to do this you will have to store the value for this control and the only way to do this is a table. I have whipped up a demo that I am attaching to this post. If the click the checkbox in the main form you will hide/make visible the control in the subform - and - this is perminent in the db until you change it back (even if you close the app)...

This should get you on the right path...

HTH,
Kev
 

Attachments

Users who are viewing this thread

Back
Top Bottom