Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 2nd, 2006, 09:59 AM
Friend of Wrox
Join Date: Sep 2005
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Corey
Default Can I make this a IIF Statement

Hi again everyone,

I'm stumped again.

I have two tables that my query is looking at.

1. tblProgramActByDay
And the other is:
2. tblProgramByProductByDay

I’m trying to tell the query to
A: Look in the Program ID Field
B: if the Program ID Field = 1667100
C: Go to the table tblProgramByProductByDay

---- In that table look for the criteria---

The Field Program ID must = 0
The Field Product ID must = 38648800
The Field Locale must = en_US
The Field Report_Date must = The Current Month

If it does

Total the amount in the Sales Field from the table tblProgramByProductByDay

If not

Take the total sales for the current month from the table tblProgramActByDay

Old November 3rd, 2006, 08:40 AM
Friend of Wrox
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts

I think I already posted to this question. Coding is a better way to go since it gives you very discrete control of this.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iif statement in Access rangeview Access 7 March 28th, 2006 01:14 PM
IIf Statement "division by zero" error Corey BOOK: Beginning Access 2003 VBA 5 September 30th, 2005 05:48 AM
IIF Statement golden Access 2 August 3rd, 2004 01:32 AM
IIF Statement golden Access 3 July 12th, 2004 07:49 PM
IIF Statement Question fastcorvette Access 8 October 31st, 2003 11:01 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.