[AccessD] If Then Else to Function

Dan Waters dwaters at usinternet.com
Wed Nov 10 10:50:58 CST 2004


Karen,

With the statement below, you are now in 'Final Review' status, not 'Open'
status.

I do this a lot.  As you go through the process, the record needs to change
status.  For example, a Nonconforming Material record might go through the
following status sequence: Description, Disposition, Approval (or Final
Review), Finish, Closed.  All of these are 'Open' except of course for
Closed.

As people enter more information, your code can change the record status as
needed.  This makes your code easier to use, and your users/managers can
more easily understand where the process is if the status is displayed
on-screen.

For your reports, make a screen that will build a SQL statement based on the
user's criteria.  Then use that SQL statement in the 'Where' argument when
the open the report.  The form can have a combobox for each bucket.  This
gives you one report that can come close to being all things to all people.

HTH,
Dan Waters
ProMation Systems

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Nicholson, Karen
Sent: Wednesday, November 10, 2004 10:21 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] If Then Else to Function

I can not find any references to this on line or in books.  I have tasks
that fall into various buckets for users to process as they move through
an approval process.  The existing database defines these buckets using
if..then..else statements across more forms and reports than I can name.
Moving to the big time, how do I convert a statement show below to a
function?  This example defines if a task is in the AS Final Review
queue.

TaskStatus: IIf([RequestType] Not In ('Field Problem','Site
Audit','Product Audit','Product Audit/Field Problem') And [Section] In
(2,3) And [Status]='Open' And Not IsNull([ASSectCompletedDate]) And
[ysnASTestRequired]=0 And [ysnASQARequired]=0,"In AS Final Review","Not
In AS Final Review")
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list