Message box if date is already in a table

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
 
L

Lynn Trapp

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.
 
J

John W. Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top