473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Type Ahead Code for Access 2003

I have been trying to use this code to enable the type ahead function in a combo box within a form that I am using. The combo box contains the id#, old compound number and new compound number. What is the simplest way to enable the type ahead function?



This is the code I am using:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cboCompound_Number_Change()
  2. Dim strTyped As String
  3.   Dim strSelect As String
  4.   strTyped = Nz(cboCompoundNumber.Text, "")
  5.   If Len(strTyped) = 3 Then
  6.     strSelect = "SELECT CompoundList.ID, NewPMXCompoundNumber, OldPMXCompoundNumber FROM CompoundList " & _
  7.        "WHERE CompoundNumber LIKE """ & strTyped & "*"" " & _
  8.        "ORDER BY CompoundNumber;"
  9.        cboCompoundNumber.RowSource = strSelect
  10.        End If
  11. End Sub
  12.  
This is my first time writing code and using Access. The easier the better.

Any assistance will be appreciated.

Thanks
Dec 15 '08 #1
2 2138
missinglinq
3,532 Expert 2GB
You don't need any VBA code! The Auto Expand property, what you are calling "type ahead function" is the default for comboboxes, and if it's been turned off, can be turned on again by selecting the combobox and going to Properties - Data and setting Auto Expand to Yes.

Your duplicate posting of this question/problem has been deleted! Please refrain from this prohibited behavior in the future.

From FAQs

Do Not Double Post Your Questions

Double posting is where you start a thread on a topic and then for some reason start another thread on exactly the same topic in the same forum. Please do not do this because

1. It makes it very hard for people to answer you especially if there are answers happening in all the threads you have started because they have to read 2 or more threads in order to see what has already been said.

2. It swamps the forum with your problem resulting in less attention for the other threads.

If you feel for some reason that you post has been overlooked (for instance it hasn't had any replies) please do not repost the question. Post a message to the thread you started, this will bump it back to the top of the thread list for the forum.

Thank you for your attention in this matter.

Welcome to Bytes!

Linq ;0)>

Moderator
Dec 15 '08 #2
Thank you! It works fine!

My first time posting. Sorry for the double posts.
Dec 15 '08 #3

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

Similar topics

0
by: David G. | last post by:
The keyboard type ahead buffer does not seem to work in Access 2003 in certain situations. We would like some help with this. Here are the details. We have a large program that was developed...
2
by: andrew | last post by:
C:\Documents and Settings\watts\My Documents\Visual Studio Projects\boeing\showPMACfg\vuePMAcfg\vuePMAcfg.cs(88): Static member 'vuePMAcfg.pmaDataHash.pmaDataHash1' cannot be accessed with an...
0
by: Erwan | last post by:
I have a strange (but very blocking) result when using the smtpmail class from an ASPX page : here is the (very simple !) code... '-------------------------------------------------- mail.To =...
12
by: Joel Byrd | last post by:
I'm having a little problem with using type-ahead functionality for an auto-suggest box. Sometimes, when I start to type something and the type-ahead shows up, the AJAX will send a request query...
2
by: tuffs | last post by:
Hi All, I am new to this group and this is my first mail to the group. I have a requirement wherein we need to support type ahead functionality for combo boxes. For e.g. Say we have 5...
4
by: sara | last post by:
I have an A2K database that has links to 3 of my other databases (external links) to run some reports. The coding in any of the 4 is pretty simple. Recently when we make a new .mde for the...
0
by: cantelow | last post by:
Hi. We're upgrading from ms access 97 to 2003 and finding that the type-ahead buffer in 2003 can't handle as many characters as we are used to in Access 97. I've found this question only once...
1
by: PeaceManGroove | last post by:
It's a long story, but our application needs to run in Access 97. All of the computers in our organisation also run Access 2003. . . C++ code launches our Access reports via a VB 6.0 program. ...
1
by: make1circle | last post by:
Hi all, It's a novice question and hopefully someone could help me out. I've designed an access form for entering patient information. Right now it needs to be modified in the way that the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.