Solved: Access 2003, Multi If statements

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

alter_ego1981

Thread Starter
Joined
Jun 26, 2008
Messages
49
Hi All,

I have been working on some multi if but i just need some help getting over the finishing line.

Background

2 x Yes/No Boxes

E_Single_Supplier
E_Multisite

So here goes

Private Sub E_Notice_Letter_Click()
If Me.E_Single_Supplier = -1 Then
If Me.E_MultiSite = -1 Then

DoCmd.OpenReport "Electricity_MultiSite_Report_1", acViewPreview
DoCmd.OpenReport "Electricity_MultiSite_Report_1a", acViewPreview
Else
DoCmd.OpenReport "Electricity_MultiSite_Report_2", acViewPreview
DoCmd.OpenReport "Electricity_MultiSite_Report_2a", acViewPreview
End If
End If


This works fine, however

I now need to build in

Same Supplier Yes
Multi Site No

Hope you can help, i feel like my head is going to explode
 

alter_ego1981

Thread Starter
Joined
Jun 26, 2008
Messages
49
Same Supplier is a yes/no box which comes from tblUtilities, same location as E_Multisite.

Thanks
 

OBP

Joined
Mar 8, 2005
Messages
19,895
What Report are you going to run if the new requirements are met?
You can probably improve your code a bit with

Private Sub E_Notice_Letter_Click()
If Me.E_Single_Supplier = -1 and Me.E_MultiSite = -1 Then

DoCmd.OpenReport "Electricity_MultiSite_Report_1", acViewPreview
DoCmd.OpenReport "Electricity_MultiSite_Report_1a", acViewPreview
Else
DoCmd.OpenReport "Electricity_MultiSite_Report_2", acViewPreview
DoCmd.OpenReport "Electricity_MultiSite_Report_2a", acViewPreview

End If
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top