|
Question : Update table with user provided data in Access 2007 connected to SQL 2000 DB
|
|
I am not very knowledgeable with Access, so this may be more of a how to do this? than a problem I am having. I need to create a DB that keeps records of inventory movements. I need something very simple for now. What I am trying to achieve is the following: I have one table residing in SQL 2000. This table has the following records: LotNumber(pk), ItemNumber, Qty, Location, Date I connected to this DB with access. Using access as the UI. I want to use a scanner. This scanner is going to scan a barcode that has the LotNumberItemNumberab>Qty, I will then scan the location from another barcode. (i could use only lotnumber since it is the pk and then the location--the date is automatic) The idea is to update the record that already exist in the DB with a new location. I am traking inventory and will like to know where a given product sits at any given time. I know how to do this with a form, but you need to select the specific record and update that, I also tried with an update query, but the way I know how to do it is too involved to have the end user do it with a scanner. I need this to be as simple as possible. I am trying to use a parameter, but I am not having any luck, or better put: I dont know what I am doing. Does anyone have any ideas on how I can accomplish this?
your help is greatly appreciated.
|
|
Answer : Update table with user provided data in Access 2007 connected to SQL 2000 DB
|
|
Hi amirson,
You could have the form set to post the data once all the fields have been filled in. It is up to you how you do this, either by having the user click an update button, scan a particular code or even once all the fields in the form have been completed (although the third option may be a bit dangerous) using:
DoCmd.RunSQL "UPDATE your_table_name SET your_table_name.your_value= new_value WHERE your_criteria"
But rather than updating the current record I would recommend adding a new entry every time an item is moved. This way you can use the most rescent entry to find the current location of an item and use the other entries to audit the movements of stock.
Hope this makes sense,
Mark.
|
|
|
|