T tony007 Registered User. Local time Today, 03:53 Joined Jun 30, 2005 Messages 53 Jul 7, 2005 #1 Hi guys. could any one help refrence primary key and forgine key in access db using vba code and show it in message box.thanks
Hi guys. could any one help refrence primary key and forgine key in access db using vba code and show it in message box.thanks
RuralGuy AWF VIP Local time Today, 04:53 Joined Jul 2, 2005 Messages 13,819 Jul 10, 2005 #2 Primary and Foreign Keys are just regular fields in a table. You would reference them the same way you reference any field in a table. I expect there is more to your question that will now appear.
Primary and Foreign Keys are just regular fields in a table. You would reference them the same way you reference any field in a table. I expect there is more to your question that will now appear.
M modest Registered User. Local time Today, 06:53 Joined Jan 4, 2005 Messages 1,220 Jul 10, 2005 #3 I think he's asking.. how can you tell if a field is a PK or a FK
T tony007 Registered User. Local time Today, 03:53 Joined Jun 30, 2005 Messages 53 Jul 10, 2005 #4 modest said: I think he's asking.. how can you tell if a field is a PK or a FK Click to expand... THank u guys for u reply. I want to use vba to identify and print the pk and fk of tables in my db . I be happy if some one show me how.Thanks
modest said: I think he's asking.. how can you tell if a field is a PK or a FK Click to expand... THank u guys for u reply. I want to use vba to identify and print the pk and fk of tables in my db . I be happy if some one show me how.Thanks
RuralGuy AWF VIP Local time Today, 04:53 Joined Jul 2, 2005 Messages 13,819 Jul 10, 2005 #5 Look in the VBA Help system for Index Collection (DAO). There are examples of code in there to print out almost anything you want. Last edited: Jul 11, 2005
Look in the VBA Help system for Index Collection (DAO). There are examples of code in there to print out almost anything you want.
T tony007 Registered User. Local time Today, 03:53 Joined Jun 30, 2005 Messages 53 Jul 11, 2005 #6 Thanks for u reply. When i try to run it in module windows . I get the following error : compile error sub or function not defind and it points to the following window Code: ' Print report. FieldOutput "TableDef", fldTableDef further more if i want run it for my current db what should i do?Thanks
Thanks for u reply. When i try to run it in module windows . I get the following error : compile error sub or function not defind and it points to the following window Code: ' Print report. FieldOutput "TableDef", fldTableDef further more if i want run it for my current db what should i do?Thanks
T tony007 Registered User. Local time Today, 03:53 Joined Jun 30, 2005 Messages 53 Jul 12, 2005 #7 Thanks again. could u tell me where to place this code ? should i add replace it with yoru first coder or add it ? Thanks
Thanks again. could u tell me where to place this code ? should i add replace it with yoru first coder or add it ? Thanks