Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 16th, 2004, 08:50 AM
ridsa ridsa is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 5 ridsa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old August 16th, 2004, 12:02 PM
magick magick is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 7 magick User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #3  
Old August 16th, 2004, 02:34 PM
ridsa ridsa is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 5 ridsa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old August 16th, 2004, 04:43 PM
tvinson tvinson is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 6 tvinson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #5  
Old August 18th, 2004, 09:23 AM
ridsa ridsa is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 5 ridsa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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...

Reply With Quote
  #6  
Old August 20th, 2004, 11:41 AM
ridsa ridsa is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 5 ridsa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Attempting to Create ordering system


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT