Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 18th, 2005, 07:19 AM
Friend of Wrox
 
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to build a funciton to return primary,alternat

How to build a funciton to return primary key,alternate key and foreign key fields

Hi every body. I need to create a function to return a string containing :

A) primary key fields together with primary key names .
B)alternate key fields together with correspondingly alternate key names.
c)foreign key fields together with correspondingly foreign key names.

I be happy if some one show me how to build such funciton since i never refrenced reletionship keys via vba.Thanks

 
Old July 18th, 2005, 07:33 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default

Hi again,

I posted a way to do this in the response to your previous query "How to refrence acces Indexes table"... this should work, if it doesnt please let me know and I'll re-visit it... having said all that, Im still really curious as to why on god's earth anyone would want this?

Cheers...
 
Old July 19th, 2005, 05:37 AM
Friend of Wrox
 
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Many thanks for your nice reply. I have purchased begining access 2000 vba book but it does not teach me how to refrence Foreign keys, Alternative keys! i do not know in which system tables these information exists and how to retrive them. As i mentioned before i need to obtain these informatin programaticaly and write them to mdb file for purpuse of creating system cataloge for access mdb . could u explain and show me how to obtain Foreign keys, Alternative keys programitaclly using vba?Thanks








Similar Threads
Thread Thread Starter Forum Replies Last Post
Return Primary Key of Last Append Query mselkregg Access 1 November 16th, 2006 11:36 AM
Primary key cf2006 BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 July 31st, 2006 07:21 PM
find by primary key mamidi Java Databases 0 December 17th, 2004 10:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.