Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I create a virtual field???

Status
Not open for further replies.

lwanalyst

Technical User
Jul 8, 2002
28
US
I have a left outer join from my main table to a ref table on the field dx_code. I need a formula that says if the code exists in the ref table show it, but if it doesn't then use the main.dx_code. This is what I have, but it gives blanks if the code doesn't exist in the ref table...

IF main.dx_code = ref.dx_code
then ref.dx_code
else if main.dx_code <> ref.dx_code or isnull(ref.dx_code)
then main.dx_code
else main.dx_code
 
You probably want to change your formula to:

If IsNull(reg.dx_code) Then
main.dx_code
Else
ref.dx_code
 
Thanks! It worked. I guess I over thought it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top