Help repairing database

BobJ

Kestrel - Crawley
Local time
Today, 13:39
Joined
Mar 22, 2007
Messages
47
Hi,

i am currently making a database for my company which will take care of the invoicing ordering and any other aspects.. i was making good progress until my manager mentioned to me that theres a special ordering number system that they want to keep and want me to incorporate into my database.. seeing as this is my first db i decided to use autonumbers at the start of the project now i need to re-design my backbone the OrderID system which most of my forms run off..

Basically my company operate in two different locations and when one is selected in the order menu i need the prefix of the OrderID (ItemCode) to change. Ive put the tables and code in but i cant get the new system to work..

I searched for ways of creating a manual version of the autonumber and found something which i tried to replace my current autonumber system with, however ive kinda messed things up and im not entirely sure how to fix it.

please reply if you would be willing to help me i would greatly appreciate it, i dont think it would take too long for some1 who knew what they were doing.

Thanks.
 
It's good practice to use an autonumber as the primary key, so I'd leave it alone and add another number to give you the meaning you need. If you've searched in these forums, you'll have found the method that uses DMax() to find the largest existing number and increments that. Until you explain what has gone wrong, we can't help.
 
A simple way of doing this
leave your autonumber alone - this works and is best practice
but you could have a loaction button/combo box which would put a prefix in your invoice/papers - don't try and merge this into an autonubmer just use it for reports

so if location A= then codeded invocie etc would be A-12345 if B then B-12345 - doing of a drop down might be a better option as you cna then have other locations should the company grow.

g
 
ok thanks guys, ill take your advice ;)
 

Users who are viewing this thread

Back
Top Bottom