Yes or No Field Help

hmho

Registered User.
Local time
Today, 04:21
Joined
Apr 7, 2009
Messages
93
I have two tables one to many relationship that I keep Phone card sales.
The Parent table has (PhoneName, SerialNo, FaceValus and QtyinBook) some books has 50 phone cards and some has 100 and others may have 25 in each book. The other table I keep daily sales for each day and it has these fields (SaleDate, PhoneName, SerialNo, FaceValue TicketNo, SoldOut) The TicketNo is the field that tels me where we are in the book and the SoldOut field is Yes or No. What I want is for example a book that has 100 phone cards when the TicketNo reaches 100 I want the SoldOut field to be automaticaly populated to YES. I have a form that I use to enter the daily sales.

Thanks
 
First, I suspect that your data is not normalized properly as you are storing the Serial Number in two tables.

Your Sales table should not contain any of the info from your Phone table EXCEPT for the PhoneID (or unique ID of Phone record).

Second, you may want to read Allen Browne's article on why you should never store a calculated value - which is what I suspect that you are trying to do. Rather, you can build a query tallies the total left in each book, and only shows records that still have inventory.

Perhaps this doesn't answer your question, but I think things will work better once your data structure is right.

Evan
 
Thanks this is very helpfull.
 

Users who are viewing this thread

Back
Top Bottom