Validation Rules

EmmaW

Registered User.
Local time
Today, 00:30
Joined
Jul 10, 2000
Messages
20
I want to know if it is possible to set a validation rule to pick up values from a differnt table.

For example I have a table of minimum order quantities and I am setting up a new table with the same field, but if a lower quantity is entered I want a message box to appear asking for a higher quantity to be entered.

HELP!!!
 
You need to code this as well.

In the OnCurrent() event on your FORMS properties, you need to write somthing like
if textbox 1 <= 10 then
docmd.openform FormName
endif

You will need to create a form that looks like a message box, ie setting popup and model values.

There are some standard msgboxs included in VBA, look through you help files to find want you use.

HTH

Ps did your maximise work?
 
Yes the maximize worked thanks very much!!

I will try this validation thing.
 
Your suggestion sounds good in theory, but the quantities of my minimum order fields are all different depending on the product it is referenced to. i.e. not all '10'. So how would I do this now?
 
I might need some more information from you, but here goes.

If your quantities are entered into differnt txt boxes then you just need to write the same code for each one, changing the text box name and quatities accordingly.

If they are entered into the same box then presumable you have another way to distiguish each product, a check box maybe...? or actual text...?

This a bit more complicated, but the basis of it is that you create nested if statements to determine which condition to apply. ie

If textbox 1 = Bottle of beer then
{insert previous code here}
else
if textbox 1 = Can of beer then
{insert previous code here}

etc etc

Do you sense a theme here....?

HTH
 
before i elaborate...

does your 'table of minimum order quantities' look something like:

Product ID
Min. Quantity

al
 

Users who are viewing this thread

Back
Top Bottom