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!

Scripting question - updating stock

Status
Not open for further replies.

epod

Technical User
Sep 25, 2002
2
AU
okay, heres whats happening. i have a 5 file relational DB, (members -> sale <-item <-product <- supplier) and my problem lies within the sale file and item/product
sale is related to item by item_id which is related to product by product_id.
[item_id is a calculation field (Left(Product Name , 10 ) & Left(Platform , 4 ) & Case(x < 10, &quot;0&quot;) & x) so that when the script is run, i have &quot;game01&quot;, &quot;game02&quot;, &quot;application01&quot;, &quot;application02&quot; and not just &quot;game01&quot;, &quot;game02&quot;, &quot;application03&quot;, &quot;application04&quot; if you get what i mean. - anyway, thats moot, since that all works, i just added it in case it is relevant and i just dont know it]

this is what i want to achieve
10 copies of a certain item
game01
game02
game03
etc.

i want to write a script, so that when i select one of these items in the main file(sale) and hit update, the item is taken off the available list so that it can no longer be selected and used in further transactions.
i.e
member x purchases game01; game01 is no longer available
member y purchases game02
as it currently is
member x purchases game01
member y purchases game01
unique field for each transaction is recorded by (member_ID & item_ID)
added with my duplicate script (which also works fine) there are no duplicates, but i simply want to make the database more true to life in that if it were a real store, once a game has been purchased, it can no longer be purchased.
i understand that you may think this is &quot;lazy students posting homework&quot; as mentioned just under the box in which i am typing this into, but it isn't.
i am genuinely seeking help to my problem, and any help that you can offer to my situation would be appreciated.
If any of what i have posted is unclear, please dont hesitate to ask.

thankyou!

James
 
Hi Epod.
Why don't you just flag the sold game and only offer unsold games?
I had a vaguely similar application and just used a field telling me whether the thing(s) were available.
Ever the optimist, HTH! Cheers,
Paul J.
 
that just relies on &quot;inteligent&quot; users, and trying to create a fool proof system is what im after here.
although, perhaps thats not such a good idea, according to murphy's law
&quot;create a system that even a fool can use and only a fool will use it&quot;
perhaps i should just not worry.
thanks for your advice, ill try and implement something to that effect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top