"field" is not an index?????

G

Guest

Help! I've designed a table with the first field, named "Unit" as an index,
duplicates OK.

Unit is defined as a text field, 12 characters long; Required = Yes; Allow
Zero Length = No; Indexed = Yes, (Duplicates OK); Unicode Compression = No

When running the following code, I get the message '"Unit" is Not an Index
in this table.'

Set dbDOB = CurrentDb()
Set recDOB = dbDOB.OpenRecordset("Test Table", dbOpenTable)
recDOB.Index = "Unit"

Is the problem the fact that I left duplicates as OK and that I should not
be using Seek on this table?
 
B

Brendan Reynolds

If you open the table in design view, and select Indexes from the View menu,
what do you see?

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
G

Guest

Oh! I never knew that was there!

I see a different name - now corrected and now working. Thanks for the
rapid response.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top