Split Code Maybe?

JinaneKarhani

Registered User.
Local time
Today, 12:43
Joined
Aug 31, 2004
Messages
15
Hello there,
i have 2 tables
Table Name Fields Type Field Type
Stages : StageID (Number,Integer) - StageName Text
Majors : MajorID (Text, 1 -could be a, b, c ..- ) - MajorName Text

i made a third table C which include in one field :
CodeC (Text, 2) XX the 1st X is the stageID & the 2nd is the MajorID
by the user selecting each time the stageID & MajorID

In Adding new records to this table C, there's no pb. but when i want to browse the records all the user can see is code 1a , 2h, 4j,.. for CodeC
how can i add 2 unbound texts which show the 1a is for WHAT ? i.e.
1a is for TD - Electronics
7h is for BS - Motherhood
... & so

thx
 
My general advice would be to NOT merge key fields like that, best is to keep the seperated and make a compound key for the third table.

If you can change it, i suggest you do. You can leave it if its to involved. But now you need to to create the key and to "pick it appart" again which is messy.

You can make an unbound control with something like:
= dlookup([Stagename],[Stages], "[StageID ]= " & left(CodeC,1))

and

= dlookup([MajorName],[Majors], "[MajorID]= '" & right(CodeC,1) & "'")

as the controle source.

Regards
 
thx mailman,
i'll try it & tell u..
btw the code i put in the 3rd table isn't the key..
 
In particular if its not the key i totaly see no reason what so ever to merge them. Keep them seperated in the table!

Greetz & GL
 
thx mailman 4 your advice,
but u know my real code is with 5 digits -texts- so i'm eliminating this way nb of unneccesary fields..

harunyahya.com An invitation to the truth
 
thx mailman,
i meant reduce the code not eliminate..
the Dlookup worked just fine.
 

Users who are viewing this thread

Back
Top Bottom