Key Field NULL

guest

Board Regular
Joined
Feb 21, 2002
Messages
91
I am having trouble understanding this myself, so forgive me if I am unclear:

I have two tables, my criteria for a query on these tables is as follows:
IF UD2 <> 0 AND VENDORID=NULL return these values.

My problem being is that VENDORID is a key field and in a separate table from UD2. If VENDORID is NULL then the query won't return anything.

How can I say if the 'table' is NULL return any UD2 <> 0 results?

Does this sound the right way to do things?

If I have not explained this at all well then I apologise.
Thanks for any assistance.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I am not really sure what you are doing but I suspect that you need to set up your query with the join properties for the tables set so that you return all records for the table with UD2 and only matching records for the table with VENDORID


HTH

Peter
 
Upvote 0

Forum statistics

Threads
1,221,566
Messages
6,160,525
Members
451,655
Latest member
rugubara

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top