Hi Brian.
If we are talking about JET here (i.e. if your tables are in an Access
database), you will not be able to do that. JET must have a unique index in
order to create a relationship with RI.
Your table may have some spurious indexes that you can dump. By default,
Access creates an index on any field that has a name ending in ID, Code,
Num, etc. (To avoid that: Tools | Options | Tables/Queries | Autoindex.)
These indexes are listed in the Indexes dialog (Tools menu) in table design,
and you can delete them there. Additionally Access creates hidden indexes on
all the foreign key fields that are involved in relationships with RI, so if
you manually index your foreign keys as well, you can remove these
duplicates as well.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Brian S. Smith" <sales@leapse.com> wrote in message
news:4ad0f901.0406081531.29482ef7@posting.google.c om...[color=blue]
>
> Please help. I've been through the Access help, searched the Web, and
> I can't seem to get a straight answer. As the Subject line suggests, I
> want to run a fairly simple VB/Access Sub Function/Module that creates
> relationships for my tables. The problem is that I need to provide for
> some tables that may have > 32 relationships (which is apparently the
> limit on Indexes that Access can support). How can I prevent Access
> from automatically creating these indexes, AND still get referential
> integrity, as viewable in my Relationships window. I started with
> this, which works fine until the 32 index-limit is reached:
>
> strSQL = "ALTER TABLE Movement_Authority ADD CONSTRAINT [FKp_115]
> FOREIGN KEY ([FKp_Limit]) REFERENCES Limit;
> DoCmd.RunSQL strSQL
>
> Then I read that this would work:
>
> strSQL = "ALTER TABLE Movement_Authority ADD CONSTRAINT NO INDEX
> [FKp_115] FOREIGN KEY ([FKp_Limit]) REFERENCES Limit;
> DoCmd.RunSQL strSQL
>
> I tried the "NO INDEX" key phrase everywhere imaginable, as well as
> with "As Database" using .Execute, still to no avail. Using DROP
> obliterates the referential integrity altogether. I sincerely hope
> SOMEONE knows what I can do, and hopefully it won't require a page of
> code and importing or using all sorts of esoteric do-dads...what the
> heck, I'll take any solution. HELP!!! Feel free to post and/or email
> me directly. Thanks in advance, -Brian
sales@leapse.com[/color]