Data Varification

khurram7x

Registered User.
Local time
Today, 14:27
Joined
Mar 4, 2015
Messages
226
I've two tables, QA (Quality Assurance) and Instruments. I'm using form to add data to QA.

There's a field in QA, named InstrumentUsed. The criteria is that InstrmentUsed should only accept value when 'status' field in Instruments table shows 'working'. If status is 'faulty' or 'need repair', it should pop up the related error message and cursor stays on the same field.

I've not starting learning VBA yet, so I'm trying to make use of Macro's.
Can somebody please help me understand:

  • how to use data from another table as a validation criteria for a field in form?
  • pops up a MessageBox and stays on the same field, on the form, unless error is resolved?
 
not quite sure where you are coming from but if you simply want to populate a field in QA with an instrument from Instruments which is working then on your form, use a combo box

set the controlsource to InstrumentUsed
the rowsource will be something like
Code:
SELECT instrument FROM Instruments WHERE Status='Working' ORDER BY Instrument
the bound column will be 0 and column count 1
 
Thanks for the tip, it worked )
What did you mean by '...where you are coming from...'?
 

Users who are viewing this thread

Back
Top Bottom