By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,853 Members | 2,246 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,853 IT Pros & Developers. It's quick & easy.

Query Issue: -1's

P: 99
Hey all,

I haev a query that has 2 different tables coming into play. For every record I have 1 of these 2 fields is filled in. If 1 of them is filled in, the other has absolutely no value in it. So I am trying to create a 3rd field which will combine the 2. That is, the 3rd field will always have a number. How can I set this up, when I try to do it in criteria i typed field [A] Or [b] and I get -1 every time. Whats up? Thanks

ex of field I want:
A B C
x x
x x
x x
x x
Aug 3 '06 #1
Share this Question
Share on Google+
1 Reply


PEB
Expert 100+
P: 1,418
PEB
Hey all,

I haev a query that has 2 different tables coming into play. For every record I have 1 of these 2 fields is filled in. If 1 of them is filled in, the other has absolutely no value in it. So I am trying to create a 3rd field which will combine the 2. That is, the 3rd field will always have a number. How can I set this up, when I try to do it in criteria i typed field [A] Or [b] and I get -1 every time. Whats up? Thanks

ex of field I want:
A B C
x x
x x
x x
x x
In your Query design grid where is the row with "Field" type the following:

C: IIF(isnull([A]),[b],[A])

And you will have your column!

Cheers

:)
Sep 9 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.