Multiple IFs in VBA - Help writing code please

  • Thread starter Thread starter Lori
  • Start date Start date
L

Lori

Okay, hopefully this is simple. I am using two pictures on a form that fill
a void when a subform is empty. I have the properties set to visible=no and
an event set up "on activate": If me.otherexpenses=0 then
me.other-excel.visible=true. This works beautifully, however, I have two
pictures. I've tried to set the code in "on open" but I get an error stating
that there is no value in the "otherexpenses" field.

How would write the code so that it will look at the "otherexpenses" and
"businesstotal"?

All help is definitely appreciated.
 
Since this is a Report news group, I would suggest you add code to the On
Format event of the section containing the images and the bound controls.
"OtherExpenses" must be bound to a control in the section in order for the
code to work.
 
that's the strange part. Either one will work fine in the "on activate"
event. So the format for both the otherexpenses and the businesstotal. My
question is how can I write this "on activate" so that it will basically do
this:

If me.otherexpenses = 0 then
me.other-excel.visible = true
AND
If me.businesstotal = 0 then
me.bus-excel.visible = true
 
Back
Top