validation field based on combox box column data

kitcheong

New member
Local time
Today, 14:07
Joined
Mar 12, 2012
Messages
2
hi,

herewith my issues and explanation:-

for example:
combo box in Form
column(1) (2) (3)
stock code item balance
B12536 blouse 5
P12356 Pant 10

For stock issue, i will select the stock code from combo box and key in quantity out, but need to set validation to this qty out field to <=combox box, column(3), that means if stock code B12536 selected, qty out validate <=5 only, should not more than stock balance qty. how do i set this validation rules in qty out field? i did set this rules in Ms Access 2003, however, it's unable to run in Ms Acess 2007.

Please to advise me.. Thank you.
 
i did set this rules in Ms Access 2003, however, it's unable to run in Ms Acess 2007.
In what way does the problem show? Do you get an error, or does the constraint fail (i.e. more than <limit> is allowed)?

Also, are you using the validation rule in the control (what is the exact syntax?) or in the click even of the combo box (what is the code?).

You say you use column numbers 1, 2, 3 - is there a column(0)? I'm wondering whether your Columns(3) reference should be Columns(2) (but presumably this is the same in the MSA 2003 version).

My own preference of validating user input is by code, where I tend to use Select Case statements within the combo box click event. I can provide an example if it's relevant to your problem, but I'd like to understand the detals before offering this as a solution.
 

Users who are viewing this thread

Back
Top Bottom