Glad it helped. It always makes sense to step away from the code and capture the exact logic prior to building complex expressions/code.
Then start with a simple proof of concept. For instance, use only 2 levels and get it right. When 2 levels work as desired then add more levels.
Finally, make sure you document. Queries are horrible if not impossible to document inline. That's why I typically prefer to create a small user-defined function that can be commented and used over and over and over. This keeps your business logic/code in one place.
Duane
From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Wednesday, June 19, 2019 9:45 AM
To: Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals]
Subject: Re: [MS_AccessPros] Nested IIF statement issues
Sent: Wednesday, June 19, 2019 9:45 AM
To: Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals]
Subject: Re: [MS_AccessPros] Nested IIF statement issues
Thank You Duane. I spent all day with this yesterday. It saved me another day.
Jim Wagner
On Tuesday, June 18, 2019, 6:44:11 PM MST, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
It seems the first question you would ask is "is there a legitimate name in Level 1 and if so, return it". This suggests something like:
Switch([Level 1]<>"<Not Applicable>",[Level 1],[Level 2]<>"<Not Applicable>",[Level 2], etc.
Duane
From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Tuesday, June 18, 2019 4:55 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Nested IIF statement issues
Sent: Tuesday, June 18, 2019 4:55 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Nested IIF statement issues
__._,_.___
Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (4) |
SPONSORED LINKS
.
__,_._,___
Tidak ada komentar:
Posting Komentar