D
DocBrown
I'm sure this has been asked and answered but can't find it here.
I have a continuous form where the user enters date, start and stop times. I
have code in the Form_BeforeUpdate event that validates that new or modified
records do not have overlapping dates/times with data in any other record in
the table. The code has access to the primary key of the filtered recordset
that is currently displayed in the form. So I know the primary key of the
record that is in conflict with the new/modified record.
Currently, I'm not displaying the primary key because it is not needed for
the user to know that. The form/query is sorted on date and time fields.
What I want to do is highlight the field, or whole record if that is easier,
of the record that is in conflict with the new data. I can't get this to
work. I think I have to use a combination of conditional formating based on a
'Expression Is' condition and using a bookmark to manage going to the
offending record, setting the condition and getting back to the current
record. Or Maybe setting a global condition true that is then picked up at
the proper time by the Conditional Formatting.
Is there an example of this or what would be the high level logic to do this?
Thanks in advance.
John
I have a continuous form where the user enters date, start and stop times. I
have code in the Form_BeforeUpdate event that validates that new or modified
records do not have overlapping dates/times with data in any other record in
the table. The code has access to the primary key of the filtered recordset
that is currently displayed in the form. So I know the primary key of the
record that is in conflict with the new/modified record.
Currently, I'm not displaying the primary key because it is not needed for
the user to know that. The form/query is sorted on date and time fields.
What I want to do is highlight the field, or whole record if that is easier,
of the record that is in conflict with the new data. I can't get this to
work. I think I have to use a combination of conditional formating based on a
'Expression Is' condition and using a bookmark to manage going to the
offending record, setting the condition and getting back to the current
record. Or Maybe setting a global condition true that is then picked up at
the proper time by the Conditional Formatting.
Is there an example of this or what would be the high level logic to do this?
Thanks in advance.
John