By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,703 Members | 1,230 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,703 IT Pros & Developers. It's quick & easy.

Access interactive search

P: 4
I'm new to Access and making my 2nd database.

In a table I have a field called "Configuratienummer" (configuration number in English), it contains four numbers, like 6443 or 8932. I want my users to be able to enter a number, and the search action should show the configuration numbers which start with the number the user entered. Example:

The table contains these numbers:
5934
5202
8009

When the user enters "5", the first two records should show. When the user enters "8", the third record should show.

Any help would be appreciated.
May 29 '07 #1
Share this Question
Share on Google+
6 Replies

puppydogbuddy
Expert 100+
P: 1,923
I'm new to Access and making my 2nd database.

In a table I have a field called "Configuratienummer" (configuration number in English), it contains four numbers, like 6443 or 8932. I want my users to be able to enter a number, and the search action should show the configuration numbers which start with the number the user entered. Example:

The table contains these numbers:
5934
5202
8009

When the user enters "5", the first two records should show. When the user enters "8", the third record should show.

Any help would be appreciated.
The only control in MS Access that has built in autoexpand capabilities that I am aware of is the combobox control. I would create a form and then add a combo box control to the form, sized to your liking. Then set the combobox's autoexpand property to yes......and proceed from there. The following link will show you how to construct a combobox and explain how it works.

http://www.fontstuff.com/access/acctut20.htm
May 29 '07 #2

P: 4
Thank you for the reply.

I believe you misunderstood. I meant that I'd like my users to enter a number into a field or prompt box, and when they click "ok" they'll see a list of search results, hence the name of this topic.

I've tried many things with queries. I can let the user enter things by using [?] as a criteria, but it only shows specific results. I want it to be something like [?]* (followed by a wildcard). Is this possible?

Of course, any ideas for alternatives would be appreciated.
May 29 '07 #3

P: 4
Sorry about the double post.

I've tried using this in the criteria field:
[Enter the first number:]&"*"
But it shows an error (translated from the Dutch MS Access): This expression is typed incorrectly or it is too complex for evaluation.

I'm not sure if it matters, but the field type is "Number" and the other settings are default.
May 29 '07 #4

puppydogbuddy
Expert 100+
P: 1,923
Sorry about the double post.

I've tried using this in the criteria field:
[Enter the first number:]&"*"
But it shows an error (translated from the Dutch MS Access): This expression is typed incorrectly or it is too complex for evaluation.

I'm not sure if it matters, but the field type is "Number" and the other settings are default.
That's easy. See below for right-sided and double-sided wildcard parameters.

Like [Enter the first number] & "*"

Like "*" & [Enter the first number] & "*"
May 29 '07 #5

P: 4
Ah-HA! Finally, it works :D.

Thanks a million, and sorry to bother you with something that simple.
May 29 '07 #6

puppydogbuddy
Expert 100+
P: 1,923
Ah-HA! Finally, it works :D.

Thanks a million, and sorry to bother you with something that simple.
You are very welcome. Glad I could help. Thanks for the feedback.
May 29 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.