Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / May 2008

Tip: Looking for answers? Try searching our database.

Multiple IFs in VBA - Help writing code please

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lori - 27 May 2008 22:21 GMT
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.
Signature

Lori A. Pong

Duane Hookom - 27 May 2008 22:32 GMT
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.

Signature

Duane Hookom
Microsoft Access MVP

> 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
[quoted text clipped - 7 lines]
>
> All help is definitely appreciated.
Lori - 28 May 2008 16:03 GMT
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
Signature

Lori A. Pong

> 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.
[quoted text clipped - 12 lines]
> >
> > All help is definitely appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.