Forums
This topic is locked
Composite Key Please help !!!!!!
Posted 13 Jun 2002 12:58:05
1
has voted
13 Jun 2002 12:58:05 Ray Waldron posted:
Hi Guys, Hope you can help.>
> I have a website that basically forms a database of itemcodes , company
codes( of which there are 3 -- 200,300,400) and product Weights into
microsoft Access.Within Access, Itemcode is a unique key. The itemcodes are
unique but CAN occur in different companies. Originally I was using a "Check
new user name" to compare an inputted item to the database and spit out an
error page if it already existed.
>
> But what I need to do now is allow an itemcode to be entered if it has a
corresponding company code that has not been entered with it before. A kinda
seconadary Unique key Kinda thingy.
>
> At the moment the itemcode is chosen from a drop down menu and company 200
,300 ,400 is enetered in a text field.this make up colum1 and column 2 in
the MSAccess Database.
> Column 1 are ticked as unique key.
>
> Is there something I need to either change in Access or add to my webpage
to allow duplicate itemcodes from DIFFERENT Companies.
> EG: of the database.
>
> ItemCode Company Data
> AERBAA01 200 TYUOTR-----DUPLICATE ITEM BUT UNIQUE WHEN COMPANY IS CONSIDERED
AERBAA01 300 IUYIUYY
> AERT2345 400 UOIUIU
> AERT7211 400 RTUIRY
>
> any help Greatly appretiated.
>
> Ray
>
P.S I have tried using composite key in Access but dreamweaver only checks the first column there must be a better way for Ultradev to handle this