|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Attempting to Create ordering system
im attempting to create an ordering system where a code is manually entered and upon entering, the code is placed in a table, with details copied from the product table, and a field which increases by an increment of one each time the code is entered. so if a product code is entered twice the order table has a value of 2 for that code.
also in a similar table of stock, each time the code is entered, the current stock value decreases by one at the same time as the order increases byone in seperate tables. Is this possible and can anyone help me? ridsaboy@hotmail.com Thanks for any help Alan |
|
#2
|
|||
|
|||
|
if not in the table, in a query?
Hi, Alan:
Is it necessary that the code which gives you the number of times the code has been entered update your table or is it something you'd be willing to do in a query? If the latter, you could create a "count of". If you are in design view of your query add the field that you want to count twice to the lower window. Turn on "Totals" (either with the button on the toolbar or by selecting View/Totals from the menu bar) the first column where that field appears, leave as "Group by". In the second, change to "Count". If you enter a name for your "CountOf" field (type the name followed by a colon at the beginning of the Field Name) you will be able to run formulas on that field in whatever query or report you base on it, enabling you to subtract that count from your stock field, for instance. |
|
#3
|
|||
|
|||
|
how would i enable the user to enter the product code into the query to signify a transaction?
Would i be able to store mulitple products so as to create an order report? thanks for replying and helping, greatly appreciated. you have no idea at all how grateful i am Alan Ridout |
|
#4
|
|||
|
|||
|
Your Answer
Use the dlookup function to find the ID of the record for which you have the code then run a query to increment/decrement the counter field
To increment: "UPDATE tblName SET fldName = fldName + 1 WHERE recID = " & lngrecID & ";" To decrement "UPDATE tblName SET fldName = fldName - 1 WHERE recID = " & lngrecID & ";" tblName is the name of the table fldName is the nae of the counter field in that table recID is the PK of that record lngrecID is the query critereia value - found from the dlookup |
|
#5
|
|||
|
|||
|
what is the pk of the record? what does pk mean?
If i was using an input box to input the record number would IngrecID just be the variable name for the input box result? sorry to sound dumb but i am... |
|
#6
|
|||
|
|||
|
Can Anyone help with my questions? Deadline is near.. lookup function wont work
I want the user to enter the code in an input box, then an if then else statement along the lines of dim Bar as string Bar = inputbox ("Please Enter The Barcode", "EPOS Scanner") If Bar = Me!BarcodeNumber then Me!CurrentStockLevel = Me!CurrentStockLevel - 1 Else msgbox ("Product Not Found") End if |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Attempting to Create ordering system |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|