Duplicate in last 100 Orders

A

aMack

I need to generate a warning that a [Container#] has been entered within the
last 100 orders [REF#]

I need the user to then choose whether to accept the entry or re-enter the
data.

My assumption is this code can be entered on the from at the "After Update"
event.

Suggestions please.
 
K

KARL DEWEY

UNTESTED UNTESTED
Have "After Update" event call macro with this condition to display message --
(SELECT TOP 100 Count([Container#]) FROM YourTable HAVING
[YourTable].[Container#] = [Forms]![YourFormName]![YourTextBox] ORDER BY
[REF#] DESC) > 1

If this will not work then use DCount >1 in condition with all the required
syntax.
 

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