Message box if date is already in a table

  • Thread starter Thread starter AJCB
  • Start date Start date
A

AJCB

Hello.

I have a problem, and was wondering if anyone could help?

I have a table whereby a date is added at the start of a process, to show
that the process has already been done for this date.

Is it possible to have in a macro a function that says "If the date is in
this table, then bring up an error message box and halt the process. If the
date is not in the table then continue with the process (macro)"

Thanks in advance
AJ
 
Can you describe the process a little more? It is probably possible to do in
VBA, but can't say for sure without more information.
 
Hello.

I have a problem, and was wondering if anyone could help?

I have a table whereby a date is added at the start of a process, to show
that the process has already been done for this date.

Is it possible to have in a macro a function that says "If the date is in
this table, then bring up an error message box and halt the process. If the
date is not in the table then continue with the process (macro)"

Thanks in advance
AJ

You could put a unique Index on the date field in the table; but you can't
really put events like this in a Table. If (as should be routine!!) you have a
Form through which the data is entered, you can do this check in the Form's
BeforeUpdate event, which can be cancelled.
 
Back
Top