Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data entered or not depending on value of control in another table

Status
Not open for further replies.

uscitizen

Technical User
Jan 17, 2003
672
US
the situation essentially revolves around enabling a data entry clerk to decide whether or not to enter a record. let's think of two forms 'A' and 'B'.

table 'A' contains a field called 'IRB' which should not have more rows entered (associated with it) than are to be found specificed in a field call 'IRB Limit', and 'IRB Limit' appears in the other table we're calling 'B'. as the clerk enters a record, (s)he enters the information in the 'IRB' fields and what is wanted is an ability to test if that record exceeds the value found in the 'IRB Limit' field of table 'B'. if so, then the decision to abort the data entry for this 'IRB' is made. if not, the record is entered.

i currently think that this can't be done 'on the fly' so to speak and that it requires aggregating the number of records per 'IRB', comparing the count computed with the 'IRB Limit' value (say in a query) and messaging the result. is this necessarily true?
 
The "messaging" idea you suggest is frustrating to the user and adds more user actions to the process, such as OK'ing the message box that tells them they can't do what they just did.

I always prefer to inhibit the user from performing any action that is disallowed by business rules. There must be some way of launching the second form, such as a button that says, "Add New IRB". I would simply disable the button when the limit has been reached.

I would perform a count in the code-behind-form in the Current event to see if the button should be disabled or not.

The user would perceive this as "on the fly."

I hope that helps,


Take care,
--Shaun

"I wish that my room had a floor; I don't care so much for a door.
But this crawling around without touching the ground is getting to be quite a bore!" -- Gelett Burgess
 
thanks for the opining - i don't know whether i agree w/ it or not, but thanks for taking time out to respond. 's appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top