This topic is locked

Project Struc.ture

5/12/2007 2:35:02 AM
ASPRunnerPro General questions
M
Michael7 author

Hi,
I have a new project to build. Could you advise me on a good practice or structure to achieve the following.

In one table I will have fields relating to sending phones away for repairs. Another table will be a lookup table for loan phones. When the customer phone goes for repairs we need to give them a loan phone.

I was trying to find a way to make sure that the loan phone does not appear in the lookup wizard for the repairs table when it is allocated to a customer. Each loan phone can only be allocated once and must be returned before it can be used again.
I am using access db for this.

If i was to add a field in the Loan Phone Table called Qty where it would = 1 or 0 depending on whether it is allocated to the Repairs table is their a way in ASP runner to make this field change between 1 or 0 when the loan phone is selected in the repairs table as the loan phone. this of course would mean editing muliple tables at once. If this can be done then i can simple at a where clause to the lookup wizard.

Would it be best to setup a master-detail relationship or an event to achieve this or should i place an expression direct into the access DB?
Thanks in Advance
Michael

Sergey Kornilov admin 5/15/2007

I think you need to write some events code what will set Qty field in LoanPhone table to 0 when phone is loned and to 1 when phone is returned. In this case you can use WHERE clause Qty>0 in Lookup Wizard setup.