While I feel sure that what you want to do is very possible, please consider
that there could be some issues to deal with. For example, just using some
code in the After Update event of each of the 20 fields to call a
user-defined function that would evaluate the current value of your
[NotQualCode] field and if that field is null then just write the value of
the current control as the value of the [NotQualCode] field would be pretty
straight forward. However, you will have to take into consideration that at
any given time the user may decide to change the values for any of the 20
controls. Now, which control will be the "first" control with the "abnormal"
value?
If the 20 controls are places one the form and named using a numbering
sequence then it would be possible to itereate through all of the 20 controls
and take the first one you fine an "abnormal" value in as the one to use in
the [NotQualCode] field.
If you can provide a little more info about just how this should work,
perhaps some of the folk around here will be able to assist.
-----
HTH
Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm
DavisGail said:
I am working in Access 2003. I have a medical form that has 20 fields. Each
field is assigned a code number. If any of those fields is marked as
abnormal, I would like my field [NotQualCode] to use the code of the FIRST
abnormal code.
Any ideas?