![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to make all my foreign currency fields invisible if the field "Forex?" is selected as "No". Can this be done without VB? I tried writing some VB below but this fails to work - any ideas would be helpful. Private Sub Budget_Requested___Salary___Year_1__FX__BeforeUpda te(Cancel As Integer) End Sub Private Sub Page470_Click() If tblApplication.secondaryCurrency =! "New Zealand Dollar" then tblSecondaryLUCurrency.Code.Visible = True else tblSecondaryLUCurrency.Code.Visible = False End Sub Private Sub secondaryCurrency_BeforeUpdate(Cancel As Integer) End Sub p.s. I haven't used VB or Access for a while so please bear with me! ![]() |
#3
| |||
| |||
|
|
Parag wrote: I'm trying to make all my foreign currency fields invisible if the field "Forex?" is selected as "No". Can this be done without VB? I tried writing some VB below but this fails to work - any ideas would be helpful. Private Sub Budget_Requested___Salary___Year_1__FX__BeforeUpda te(Cancel As Integer) End Sub Private Sub Page470_Click() If tblApplication.secondaryCurrency =! "New Zealand Dollar" then tblSecondaryLUCurrency.Code.Visible = True else tblSecondaryLUCurrency.Code.Visible = False End Sub Private Sub secondaryCurrency_BeforeUpdate(Cancel As Integer) End Sub p.s. I haven't used VB or Access for a while so please bear with me! ![]() I use a syntax like Me.YourControlName.Visible = _ (tblApplication.secondaryCurrency = "New Zealand Dollar") that compares to true/false. I'd also use <> or Not. tblApplication.secondaryCurrency <> "New Zealand Dollar" Not (tblApplication.secondaryCurrency = "New Zealand Dollar") I'm not sure why you'd be attempting to hide a table field like tblApplication.secondaryCurrency. I'd use a Me or Forms reference and hide the control on a form or report. Forms!MainForm!YourControlName.Visible... Me.YourControlName.Visible... |
![]() |
| Thread Tools | |
| Display Modes | |
| |