IF within a Macro

locksp

Registered User.
Local time
Yesterday, 22:40
Joined
Sep 15, 2009
Messages
20
:banghead:Hi,
I'm trying to create a Macro (as I'm not familiar with VB) to set a subform within my switchboard to visible. I have mastered that part.

What I am struggling with, is setting the condition to set the subform to visible.

The condition is based on one of two fields (either or/both) having a numeric value, i.e. are not null. so if there is a value present in either or both fields, then the subform is visible. This macro is to run on opening the switchboard.

The database is as follows

Table called: - Aircraft Info
Fields within table: - Telem Fwd & Telem Aft
Subform within switchboard:- Telem Freq

Any suggestions would be much appreciated.

Steve
 
Basically my thinking is that if you can use macros you can use simple VBA.
VBA:
If field1 = field2 then
Do something
Field1.visible=true
else
Do some more stuff
Field2.visible=false
end if


We need to know what fields your are testing and for what and what you want to do if true or false.
Dale
 
Hi,

Sorry, The fields to be tested are Telem Fwd & Telem Aft (within the Aircraft Info table)

I want to test to see if there is a numeric value in either or both fields.

If there is, then the macro will set the subform Telem Freq (within the switchboard) to visible.

If there is no numeric value then it will do nothing ( leave visible set to zero).

Thanks
 

Users who are viewing this thread

Back
Top Bottom