Validation Problem

D

DW

How can you validate a form against another table?
The table "MR" has got entries in groups of four(not grouped), anotherwords
each entry has got a number specific to that entry that reoccurs (1-4) each
month,
table example,
bmr emr pn
1.0 2.0 1
3.0 4.0 2
6.0 6.5 3
8.1 8.3 4

the form (which goes to a different table)goes through the same, it starts
at 1 with the user typing data in the fields "cb" and "ce", then each record
is entered.

What I am trying to do is make sure that when they type in the form that the
numbers they enter are greater than the ones in the "MR" table according to
the "PN" number for the last record.
A little complex explaining this. You can tell a newbie
Thanks.
 
M

Michel Walsh

Hi,

Not exactly what you asked, but maybe it does the trick easily: have a
check about

Me.pn > DMax("pn", "MR")


in the after update event of the control?



Hoping it may help,
Vanderghast, Access MVP
 

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