Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Indexed field

27 views
Skip to first unread message

joan...@gmail.com

unread,
May 20, 2012, 8:15:57 PM5/20/12
to
In Access 2010 I defined a table field as indexed no duplicates but I have no idea how to use this index to find and display any particular record on a form. Can any one help please?
Thanks,
Eric. (fairly new beginner)

Tony Toews

unread,
May 20, 2012, 9:15:34 PM5/20/12
to
On Sun, 20 May 2012 17:15:57 -0700 (PDT), joan...@gmail.com wrote:

>In Access 2010 I defined a table field as indexed no duplicates but I have no idea how to use this index to find and display any particular record on a form. Can any one help please?

You don't need to code for a specific index. If an index is available
then Access will use it. If an index isn't available then Access will
be forced to scan all the records in a table. If only a few hundred
or thousand records then not a problem. If 500K records then you do
have a problem.

Sometimes indexing boolean fields on a "lookup"/"master" table with a
few hundred records can make a huge difference when that table is
joined with another table with 100K records.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Access Developer

unread,
May 20, 2012, 10:01:05 PM5/20/12
to
The Combo Box wizard for earlier versions of Access has an option for
locating and displaying the selected Record. I have not heard that the
option has been removed. That option will work on any Feld which has no
duplicates (whether the Field is indexed or not).

I understand this was the question you asked.

Tony appeared to understand your question to ask how you cause Access to
internally use the index in retrieving the records -- and he gave you the
correct answer to that question.

--
Larry Linson
Microsoft Office Access MVP
Co-Author, Microsoft Access Small Business Solutions, Wiley 2010

<joan...@gmail.com> wrote in message
news:b7243ca8-b745-4637...@googlegroups.com...

joan...@gmail.com

unread,
May 20, 2012, 11:41:58 PM5/20/12
to
Thank you both for your answers.
I know that if I include the index field in the form then I could use the search input at the bottom of the form to find the record. But what I had in mind was to perhaps create another text box at the top of the form and then use this input to somehow find the record. Alternativly perhaps use a front end form to input the search word and then go on to the main form to display the record.
This second option might be better for the user.
Thank you,
Eric

Access Developer

unread,
May 21, 2012, 1:38:48 AM5/21/12
to
Use the Combo Box instead of a Text Box, because with AutoExpand set to Yes,
it will scroll, and it will limit you to values that are actually in the
Table (or Query) you use for its Row Source. There's no point in going to
the trouble of entering a value that you canNOT find because it's not there.
And, the Combo Box wizard generates the necessary code or macro for you.

--
Larry Linson
Microsoft Office Access MVP
Co-Author, Microsoft Access Small Business Solutions, Wiley 2010

<joan...@gmail.com> wrote in message
news:8d5aa06d-45c0-4a6d...@googlegroups.com...
0 new messages