Automatically output value when other data is present

tomgrant00

Tom Grant
Local time
Yesterday, 18:44
Joined
Nov 28, 2006
Messages
2
Hey there,

I'm setting up a small EPoS system for a shop and was wondering if you could help. I want a stock number to be entered (i.e. a barcode) and then the item name and price to automatically be entered.

I have the fields 'StockID, Description, RetailPrice' in tblTransaction and basically want the StockID to be enetered and the description and retailprice to be automatically be read from tblStock and placed in tblTransaction.

Any ideas? Hope this was clear enough...its really hard to describe!

Thanks,

A very puzzeled Tom!:p
 
What i have done in the past is set up a combo box with the needed fields - for you that would be 'StockID, Description, RetailPrice' then use the after update to populate the text fields...

Private Sub List386_AfterUpdate()
Me.DescripText = Me.List386.Column(1)
Me.RetailPricText = Me.List386.Column(2)
End Sub

the barcode scanner will jump the combo box to the appropriate field while the combo box is active...
...this method also helps in case of tragic barcode reader failure as it still works as a pulldown...
 
Are sure that you need to STORE all of this data in another table, or just be able to DISPLAY this data on one or more forms and reports?

Data that NEVER changes should not be stored more than once. I suspect your product name and description are fixed w.r.t. the StockID, whereas the RetailPrice may be time variant, and needs to be stored at transaction time.

Therefore, you may want to store the StockID, the RetailPrice, and whatever else defines a transaction (such as the datetime), but rely on your Joins to lookup the name and description stuff whenever you need it on a form or report.
 

Users who are viewing this thread

Back
Top Bottom