Kdankwah
asked on
Record level validation
I have two combo boxes looking at the same table in my database, is there a way to check that the two combo boxes have the same record as in the table. The first combo box is cbodept and the second one is cbosegment. Table name is depttable. I was thinking of using the beforeupdate. I would like to place on the form properties, is this right? I want to make sure what's on the record in the table matches what is being entered by the user.
Thanks
Thanks
mmm - not sure what you mean either - the combo boxes will always reference the same record in the table.... can you explain in more detail ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Certainly you can return in the rowsource for each the primary key for the record in the table.
You can then bind the cbo's to that field, or look at the field using the combo's .Column() method to see the data.
The other thing to do would be to set the 2nd combo based on the value in the first. Then you'd be sure to be on the same record.
You would do that in the afterupdate event of the first combo.
You also could allow for the 2nd combo updating the 1st in the same way.
If that doesn't answer the question, then a little more detail on exactly what it is your trying to do would help.
Jim.