Primary Key Question

Switchwork

Registered User.
Local time
Today, 22:08
Joined
Dec 1, 2003
Messages
81
Not Sure On Pk

Hello to clarify something. When designing a table you need a PK yeah??
Well when you design a form, for example i have CustomerID in the Customertble. When designing the form do I need to use the CustomerID field in the form or can I just use the Customer name field??

Basically do I need to have the PK fields on the forms?? At the moment I have both CustomerName and CustomerID on my JobDetailsTble (which is my main table) I also have EmployeeID and employee name in this table as well as the PK for this table which is JobNo. Can I just enter the Customer Name and EMployee Name Fields into the form or do I need to use the primary keys?? Or do I need to have both in this Form???

Please help me!!! I am sorry if I have not been very clear but it is sort of hard to explain. Well i know what I want to say but I cant seem to write it down.

If any one understands what I am going on about please feel free to comment and advise me. While I go away and think about an easier way of explaining it!!!

Thanx and respect.
If no reply I will write in tomorrow with an easier way of explaining it ok?
THANX AGAIN!!!!!:confused:
 
Okay think I understand your problem.

If the form is purely used for displaying information and the primary key would not add to the user's understanding then there is no necessity for it to be shown. Personally I always include it in the selection query and quite often include it on the form but turn off the visible property.

If you are using the for for data entry then it does depend upon the data type. If it is an autonumber then you probably do not need to actually show it. If it is some specific reference then maybe it should be shown. If in doubt include it and turn off the visible property.

I frequently include data elements that I may be interested in whilst developing and then simply turn off the visible property so the user does not see them.

Very handy later if there is a question cos all my checking or tracing fields are there but just hidden

HTH

Len B
 
Thanx so much pal. You have totally understood what I was going on about. Didn't think anyone would get it!!! But you did and you explained perfectly.

Thanx again. Any more questions that sound complicated to me I know where to come!!
I do have other questions but they don't belong in this forum so I am popping into the forms forum and then maybe the general.

So if you wanna help me again mate thats where I will be!!

THANX AGAIN AND RESPECT TO YOU!!!!!
 

Users who are viewing this thread

Back
Top Bottom