473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

iif expression in multiple table query

I'm currently having a hard time getting my expression to run in my
billing query.

My setup:
MS Access 2003
Qry Billing (includes 6 tables such as Client, Price list, Formula,
Order, Order detail and Billing)
This query helps to create our invoice forms.

My problem:
Our Government has been so kind enough to reduce our sales tax by 1% as
per the 1st of July 2006. But this nice gesture has been giving me
headaches. In my query, I've applied the tax rate manually like so
[TPS RATE: 0.07]

I initially tried going through VB but I didn't manage to get
fonctionnal end result.

What I wish to do is to implement a conditionnal rate that will take
into consideration the date change. I've tried many option all around
the following suggestion but nothing seems to be working. (#38899 is
the equivalent number for July 1st 2006).

TPS RATE: iff( ([Billing]![BILLING DATE] < Date(38899)),"0.07",
"0.06")

Since a rate of 7% applies prior to july 1st and becomes 6% (july 1st
included). I want the system to manage the rate change.

Regards

Jun 26 '06 #1
3 3455
AP
Hello
try using CVDATE(XXX) instead of DATE()
Beejer wrote:
I'm currently having a hard time getting my expression to run in my
billing query.

My setup:
MS Access 2003
Qry Billing (includes 6 tables such as Client, Price list, Formula,
Order, Order detail and Billing)
This query helps to create our invoice forms.

My problem:
Our Government has been so kind enough to reduce our sales tax by 1% as
per the 1st of July 2006. But this nice gesture has been giving me
headaches. In my query, I've applied the tax rate manually like so
[TPS RATE: 0.07]

I initially tried going through VB but I didn't manage to get
fonctionnal end result.

What I wish to do is to implement a conditionnal rate that will take
into consideration the date change. I've tried many option all around
the following suggestion but nothing seems to be working. (#38899 is
the equivalent number for July 1st 2006).

TPS RATE: iff( ([Billing]![BILLING DATE] < Date(38899)),"0.07",
"0.06")

Since a rate of 7% applies prior to july 1st and becomes 6% (july 1st
included). I want the system to manage the rate change.

Regards


Jun 26 '06 #2
"Beejer" <bj********@yahoo.ca> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...

What I wish to do is to implement a conditionnal rate that will take
into consideration the date change. I've tried many option all around
the following suggestion but nothing seems to be working. (#38899 is
the equivalent number for July 1st 2006).

TPS RATE: iff( ([Billing]![BILLING DATE] < Date(38899)),"0.07",
"0.06")

Since a rate of 7% applies prior to july 1st and becomes 6% (july 1st
included). I want the system to manage the rate change.

Regards


I think < Date(38899) might be the problem - what's wrong with using the
Gregorian date?

Keith.
www.keithwilby.com
Jun 26 '06 #3
Thanks for the suggestion... but everything I try dosen't seem to work
in the query expression. I even tried to go thru VB editor with a
controlsource text box... no success there either. Since the system
wasn't setup to archive the invoices... the rate will be changed
manually in the query on the effective date.

I'm still going to try to make it work for my personnal satisfaction.

Thanks for the help.

Beejer
AP a écrit :
Hello
try using CVDATE(XXX) instead of DATE()
Beejer wrote:
I'm currently having a hard time getting my expression to run in my
billing query.

My setup:
MS Access 2003
Qry Billing (includes 6 tables such as Client, Price list, Formula,
Order, Order detail and Billing)
This query helps to create our invoice forms.

My problem:
Our Government has been so kind enough to reduce our sales tax by 1% as
per the 1st of July 2006. But this nice gesture has been giving me
headaches. In my query, I've applied the tax rate manually like so
[TPS RATE: 0.07]

I initially tried going through VB but I didn't manage to get
fonctionnal end result.

What I wish to do is to implement a conditionnal rate that will take
into consideration the date change. I've tried many option all around
the following suggestion but nothing seems to be working. (#38899 is
the equivalent number for July 1st 2006).

TPS RATE: iff( ([Billing]![BILLING DATE] < Date(38899)),"0.07",
"0.06")

Since a rate of 7% applies prior to july 1st and becomes 6% (july 1st
included). I want the system to manage the rate change.

Regards


Jun 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: randi_clausen | last post by:
Using SQL against a DB2 table the 'with' key word is used to dynamically create a temporary table with an SQL statement that is retained for the duration of that SQL statement. What is the...
7
by: John Øllgård Jensen | last post by:
Hi Using MS Asccess 2000: In a query I'm trying to create a new field with following expression: FilmDate: Left(,4) The field "FilmNo" is another text field in the query. This is...
10
by: sandraz444 | last post by:
I have an expression in the query under my form to autofill the date under a certain condition but it wont write to the underlying table?? The date shows in the form but not the table. Does anyone...
5
by: EricS | last post by:
Hi, Was wondering if anyone can help. I have multiple queries in a database. The selection criteria for these queries is always a time period I want to do the analysis by. Rather than having to go...
10
by: aaronrm | last post by:
I have a real simple cross-tab query that I am trying to sum on as the action but I am getting the "data type mismatch criteria expression" error. About three queries up the food chain from this...
19
by: Coastie | last post by:
Good afternoon- There is a table with the following fields: PK*, Equipment_ID, Battery_Serial *= arbitrary primary key Each piece of equipment has between 0 and 3 batteries, and each battery...
92
by: bonneylake | last post by:
Hey Everyone, Well i was hoping someone could explain the best way i could go about this. i have a few ideas on how i could go about this but i am just not sure if it would work. Right now i...
58
by: bonneylake | last post by:
Hey Everyone, Well recently i been inserting multiple fields for a section in my form called "serial". Well now i am trying to insert multiple fields for the not only the serial section but also...
482
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.