Help With Append Query Ms Access 2003

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.

nursell

Thread Starter
Joined
Jul 26, 2011
Messages
143
Hi,

I have an append query that pulls data from 2 tables joined by the "CustNum" If the order has a seperate delivery address the program saves the the delivery address in the Customers table so then i need to join the tables by "CustNum" in the customers table and the "ShipNum" in the orders table. I was thinking is it possible to use an IIF statement?

for example if the "ShipNum" = 0 then the join would be "CustNum" in the customers table and "CustNum" in the orders table and if the "ShipNum" is greater than 0 the join would be "CustNum" in the customers table and "ShipNum" in the orders table.

Ihope this makes sense and someone can help me.

Thanks.
 

OBP

Joined
Mar 8, 2005
Messages
19,895
I am not aware of being able to adjust joins with an IIF statement.
You can rewrite a query DEF using VBA code.
But is it necessary, I am not clear on what it is you are doing.
 

nursell

Thread Starter
Joined
Jul 26, 2011
Messages
143
If the shipnum is greater than 0 then the customers table needs to be joined to the orders table using the shipnum in the orders table otherwise if it is 0 then join using the custnum
 

OBP

Joined
Mar 8, 2005
Messages
19,895
Why not just 2 queries one using shipnum and one using custnum and based on the value shipnum choose the correct query.
 

nursell

Thread Starter
Joined
Jul 26, 2011
Messages
143
I know i can do it with 2 queries quite easily. I have about a 1000 records to append i really dont want to b splitting a 1000 orders every day. Any help using the one query will be appreciated
 
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

Members online

Top