Link to home
Create AccountLog in
Avatar of keschuster
keschuster

asked on

Access SQL - checking for complete address

I have a table that has
Address1
City
State
Zip

Mailing Address1
Mailing City
Mailing State
Mailing Zip

Send To Address1
Send To City
Send To State
Send To Zip

Only one of the three groups has a complete address.  Basically if Send to is incomplete, check Mail To.  If that is incomplete check Address for completeness.

The unit must be complete to be accepted as a valid address.  And The check works from the bottom up as indicated above.

Any ideas on an efficient way to check this?  I was thinking a function that would return true if all fields were complete in an IF statement for each item.  Just seems like lots of IF statements with some lengthly function calls

Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of Eddie Antar
Eddie Antar
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
A better way to to this would be to store the address level and then use it consistently instead of calling getaddresslevel over and over.

Just a thought,
EA
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Forced accept.

Computer101
EE Admin