I'm looking for some code that makes a list presented in a subform
autoscroll in response to the user typing - like a combo box dropdown
or a regular ListBox does.
I.e. The user is looking at subform that is a list of, say, 2,000
people's names. The first name is "Aardvark, John", and the last name
is "Zero, James".
Instead of scrolling, the user types "S" and is jumped to "Sammons".
Then, on the next keystroke as they type "m", it jumps to "Small", and
after they've typed "i" they're located at the first "Smith". From
the user's perspective, they just typed "smi" without doing anything
else and were magically transported to "Smith".
I've implemented this before, but my code was sort of crude. The
first keystroke popped a dialog, which trapped subsequent keystrokes
and didn't do the locate until the user clicked it's "Locate" button.
Does anybody know of something the more closely duplicates the
existing behavior of MS Access combo box dropdowns/list boxes?
One probem would seem to be able to capture/identify/delimit that
string of keystrokes and somehow know when to stop capturing and start
locating - as opposed to going to "S", then going to "M", then going
to "I" like most combo boxes on web apps seem to. 8 2438
Hi Pete,
I have been struggling with this myself, I went to http://www.janusys.com/janus/library/ , and got an activeX to do it. They
have some nice components. It was long time ago, so I don´t remember the
details.
Have fun !
Regards
Allan
"PeteCressw ell" <Go**********@F atBelly.com> wrote in message
news:74******** *************** ***@posting.goo gle.com... I'm looking for some code that makes a list presented in a subform autoscroll in response to the user typing - like a combo box dropdown or a regular ListBox does.
I.e. The user is looking at subform that is a list of, say, 2,000 people's names. The first name is "Aardvark, John", and the last name is "Zero, James".
Instead of scrolling, the user types "S" and is jumped to "Sammons". Then, on the next keystroke as they type "m", it jumps to "Small", and after they've typed "i" they're located at the first "Smith". From the user's perspective, they just typed "smi" without doing anything else and were magically transported to "Smith".
I've implemented this before, but my code was sort of crude. The first keystroke popped a dialog, which trapped subsequent keystrokes and didn't do the locate until the user clicked it's "Locate" button.
Does anybody know of something the more closely duplicates the existing behavior of MS Access combo box dropdowns/list boxes?
One probem would seem to be able to capture/identify/delimit that string of keystrokes and somehow know when to stop capturing and start locating - as opposed to going to "S", then going to "M", then going to "I" like most combo boxes on web apps seem to.
Hi Pete,
I don't have the code but it shouldn't be too hard to do ---
First, you need a textbox where the user types the name he wants to go to.
Second, you need the subform containing a field holding names. The subform needs
to be based on a query with the sort order of the personname field set to
ascending. Comboboxes and Listboxes rely on a sorted list and the subform will
too.
Third you need code in the OnChange event of the textbox that goes to the first
record where personname is : Like Forms!MyForm!Na meOfTextBox & "*". This gets
you to the record. You might look in ADH (Getz), there's an example there to do
this with a textbox and a listbox. He uses a recordset that is continuously open
rather that opening and closing the recordset each time a letter is entered in
the textbox. Makes this part much faster.You could highlight the record here too
with conditional formatting.
Finally, you need code that scrolls the subform if the current record is not in
the visible records to place the current record in the group of visible records.
Stephen Lebans (Lebans.com) has some code for this.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications re******@pcdata sheet.com www.pcdatasheet.com
"PeteCressw ell" <Go**********@F atBelly.com> wrote in message
news:74******** *************** ***@posting.goo gle.com... I'm looking for some code that makes a list presented in a subform autoscroll in response to the user typing - like a combo box dropdown or a regular ListBox does.
I.e. The user is looking at subform that is a list of, say, 2,000 people's names. The first name is "Aardvark, John", and the last name is "Zero, James".
Instead of scrolling, the user types "S" and is jumped to "Sammons". Then, on the next keystroke as they type "m", it jumps to "Small", and after they've typed "i" they're located at the first "Smith". From the user's perspective, they just typed "smi" without doing anything else and were magically transported to "Smith".
I've implemented this before, but my code was sort of crude. The first keystroke popped a dialog, which trapped subsequent keystrokes and didn't do the locate until the user clicked it's "Locate" button.
Does anybody know of something the more closely duplicates the existing behavior of MS Access combo box dropdowns/list boxes?
One probem would seem to be able to capture/identify/delimit that string of keystrokes and somehow know when to stop capturing and start locating - as opposed to going to "S", then going to "M", then going to "I" like most combo boxes on web apps seem to.
Try the sample available at: http://msdn.microsoft.com/library/de...nacbk02/html/O
DC_CookbookChap ter8.asp
_______________ _______________ _
"PeteCressw ell" <Go**********@F atBelly.com> wrote in message
news:74******** *************** ***@posting.goo gle.com...
I'm looking for some code that makes a list presented in a subform
autoscroll in response to the user typing - like a combo box dropdown
or a regular ListBox does.
I.e. The user is looking at subform that is a list of, say, 2,000
people's names. The first name is "Aardvark, John", and the last name
is "Zero, James".
Instead of scrolling, the user types "S" and is jumped to "Sammons".
Then, on the next keystroke as they type "m", it jumps to "Small", and
after they've typed "i" they're located at the first "Smith". From
the user's perspective, they just typed "smi" without doing anything
else and were magically transported to "Smith".
I've implemented this before, but my code was sort of crude. The
first keystroke popped a dialog, which trapped subsequent keystrokes
and didn't do the locate until the user clicked it's "Locate" button.
Does anybody know of something the more closely duplicates the
existing behavior of MS Access combo box dropdowns/list boxes?
One probem would seem to be able to capture/identify/delimit that
string of keystrokes and somehow know when to stop capturing and start
locating - as opposed to going to "S", then going to "M", then going
to "I" like most combo boxes on web apps seem to.
Tom,
After pasting the link back together from the word wrap, I get the message the
Page can not be found!
Steve
"Tom Wickerath" <AOS168 @ comcast . net> wrote in message
news:Hp******** @news.boeing.co m... Try the sample available at: http://msdn.microsoft.com/library/de...nacbk02/html/O DC_CookbookChap ter8.asp
_______________ _______________ _
"PeteCressw ell" <Go**********@F atBelly.com> wrote in message news:74******** *************** ***@posting.goo gle.com...
I'm looking for some code that makes a list presented in a subform autoscroll in response to the user typing - like a combo box dropdown or a regular ListBox does.
I.e. The user is looking at subform that is a list of, say, 2,000 people's names. The first name is "Aardvark, John", and the last name is "Zero, James".
Instead of scrolling, the user types "S" and is jumped to "Sammons". Then, on the next keystroke as they type "m", it jumps to "Small", and after they've typed "i" they're located at the first "Smith". From the user's perspective, they just typed "smi" without doing anything else and were magically transported to "Smith".
I've implemented this before, but my code was sort of crude. The first keystroke popped a dialog, which trapped subsequent keystrokes and didn't do the locate until the user clicked it's "Locate" button.
Does anybody know of something the more closely duplicates the existing behavior of MS Access combo box dropdowns/list boxes?
One probem would seem to be able to capture/identify/delimit that string of keystrokes and somehow know when to stop capturing and start locating - as opposed to going to "S", then going to "M", then going to "I" like most combo boxes on web apps seem to.
I just did something like this for an asp page using xml. Here is the
Access version (much simpler).
Private Sub Text1_KeyUp(Key Code As Integer, Shift As Integer)
Static str1 As String
If KeyCode >= 65 And KeyCode <= 90 Then
str1 = str1 & Chr(KeyCode)
Else
str1 = ""
End If
Me.subfrm.Form. RecordSource = "Select * from Tbl1 Where fldx Like '"
& str1 & "*'"
End Sub
Use the KeyUp event of your textbox. This assumes your subform is in
Datasheet view. I made str1 static. That way you can add characters to
str1 without losing the previous char on each keyup for that textbox.
Then I append a * wildcard. I didn't have to use Static in the xml
version (it was way less fun :). Note: KeyCode will only capture codes
65 through 90 (uppercase chars) even for lower case chars. But Sql
doesn't care - it's all the same.
Rich
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Hi Steve,
Try it one more time. I just tried the same link, and it worked fine for me after pasting
it back together.
As an alternative, navigate to MSDN at: http://msdn.microsoft.com/library/
and then enter the search term:
Make Slow Forms Run Faster
The first hit is that article that you want:
Chapter 8 Excerpt: Make Slow Forms Run Faster (Microsoft Access 2002 Book Excerpts)
Change Access forms to load and display faster. (5 printed pages) http://msdn.microsoft.com/library/en...okChapter8.asp
Tom
_______________ _______________ ___________
"Steve" <sp**@nospam.co m> wrote in message
news:f0******** *********@newsr ead1.news.atl.e arthlink.net...
Tom,
After pasting the link back together from the word wrap, I get the message the
Page can not be found!
Steve
_______________ _______________ ___________
"Tom Wickerath" <AOS168 @ comcast . net> wrote in message
news:Hp******** @news.boeing.co m... Try the sample available at: http://msdn.microsoft.com/library/de...nacbk02/html/O DC_CookbookChap ter8.asp
_______________ _______________ _
"PeteCressw ell" <Go**********@F atBelly.com> wrote in message news:74******** *************** ***@posting.goo gle.com...
I'm looking for some code that makes a list presented in a subform autoscroll in response to the user typing - like a combo box dropdown or a regular ListBox does.
I.e. The user is looking at subform that is a list of, say, 2,000 people's names. The first name is "Aardvark, John", and the last name is "Zero, James".
Instead of scrolling, the user types "S" and is jumped to "Sammons". Then, on the next keystroke as they type "m", it jumps to "Small", and after they've typed "i" they're located at the first "Smith". From the user's perspective, they just typed "smi" without doing anything else and were magically transported to "Smith".
I've implemented this before, but my code was sort of crude. The first keystroke popped a dialog, which trapped subsequent keystrokes and didn't do the locate until the user clicked it's "Locate" button.
Does anybody know of something the more closely duplicates the existing behavior of MS Access combo box dropdowns/list boxes?
One probem would seem to be able to capture/identify/delimit that string of keystrokes and somehow know when to stop capturing and start locating - as opposed to going to "S", then going to "M", then going to "I" like most combo boxes on web apps seem to.
Thanks, Tom,
The link worked here.
Steve
"Tom Wickerath" <AO************ ***********@com cast.net> wrote in message
news:mK******** ************@co mcast.com... Hi Steve,
Try it one more time. I just tried the same link, and it worked fine for me
after pasting it back together.
As an alternative, navigate to MSDN at: http://msdn.microsoft.com/library/
and then enter the search term:
Make Slow Forms Run Faster
The first hit is that article that you want:
Chapter 8 Excerpt: Make Slow Forms Run Faster (Microsoft Access 2002 Book
Excerpts) Change Access forms to load and display faster. (5 printed pages) http://msdn.microsoft.com/library/en...okChapter8.asp
Tom
_______________ _______________ ___________
"Steve" <sp**@nospam.co m> wrote in message news:f0******** *********@newsr ead1.news.atl.e arthlink.net...
Tom,
After pasting the link back together from the word wrap, I get the message the Page can not be found!
Steve _______________ _______________ ___________
"Tom Wickerath" <AOS168 @ comcast . net> wrote in message news:Hp******** @news.boeing.co m... Try the sample available at: http://msdn.microsoft.com/library/de...nacbk02/html/O DC_CookbookChap ter8.asp
_______________ _______________ _
"PeteCressw ell" <Go**********@F atBelly.com> wrote in message news:74******** *************** ***@posting.goo gle.com...
I'm looking for some code that makes a list presented in a subform autoscroll in response to the user typing - like a combo box dropdown or a regular ListBox does.
I.e. The user is looking at subform that is a list of, say, 2,000 people's names. The first name is "Aardvark, John", and the last name is "Zero, James".
Instead of scrolling, the user types "S" and is jumped to "Sammons". Then, on the next keystroke as they type "m", it jumps to "Small", and after they've typed "i" they're located at the first "Smith". From the user's perspective, they just typed "smi" without doing anything else and were magically transported to "Smith".
I've implemented this before, but my code was sort of crude. The first keystroke popped a dialog, which trapped subsequent keystrokes and didn't do the locate until the user clicked it's "Locate" button.
Does anybody know of something the more closely duplicates the existing behavior of MS Access combo box dropdowns/list boxes?
One probem would seem to be able to capture/identify/delimit that string of keystrokes and somehow know when to stop capturing and start locating - as opposed to going to "S", then going to "M", then going to "I" like most combo boxes on web apps seem to.
RE/ I just did something like this for an asp page using xml. Here is the Access version (much simpler).
Private Sub Text1_KeyUp(Key Code As Integer, Shift As Integer) Static str1 As String If KeyCode >= 65 And KeyCode <= 90 Then str1 = str1 & Chr(KeyCode) Else str1 = "" End If Me.subfrm.Form. RecordSource = "Select * from Tbl1 Where fldx Like '" & str1 & "*'" End Sub
Thanks all.
I abandoned the idea of trying to do it without a form to capture keystrokes -
seemed too complicated to tell where the stroke string ended....(maybe via some
kind of TickCount calc...)
Anyhow, what I did was use KeyPress to capture the first stroke, then pass it to
a modal dialog that consisted of just a single text box.
After copying .OpenArgs into the textbox and doing a .SelSet I used the text
box's KeyPress to capture subsequent keystrokes and trap for Return/Enter.
Once the user hits one of those, I copy the complete captured string to a global
variable, close the form, and return control to the calling routine (the list's
KeyPress).
The list's KeyPress then checks the string to see if there's anything in it,
opens up a .RecordsetClone , finds a record, grabs the .BookMark, and sets the
form's .BookMark.
The two problems I had were:
1) Getting it through my head that KeyDown wasn't going to work as easily
because I'd have to case out on the numeric keypad - whereas KeyPress gives me
the ASCII value regardless of what key the user pressed.
2) Biting the bullet and filtering those ASCII characters down to the real-world
possibilities.
--
PeteCresswell This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Donna Sabol |
last post by:
I have a form (frm_MAIN_RPT) that contains a combo box (Combo6) &
subform (dbo_REQ_subform). The combo box is used to select the "cost
center" data that will be displayed in the subform. From there, I
have a button that runs a report based on which item I select in the
subform.
1. The Combo Box correctly displays the list of cost centers within
the combo box.
2. The subform, when opened separately, correctly displays the data
for the...
|
by: Kelly |
last post by:
I have a subform that display requisition information. One of the
fields in the subform is a combo box that shows who requested the
requisition. The users can change who requested the requisition and I
would like to only have them be able to choose active employees. So,
I have written the query for the rowsource for this combo box, which
is based on an employees table, to look at all active employees and
the employee that is currently...
|
by: Robert |
last post by:
Am using a nested continuous bound subform to add multiple records to the
underlying table. One of the fields is based on a limit to list combo box.
Any suggestions on best way to progressively update the combo box query so
that for each new record being entered the combo box list excludes items in
the combo box list previously selected.
Aim is to prevent user from selecting the same combo list item more than
once if the user has already...
|
by: Robert |
last post by:
Need some help to stop me going around in circles on this one....
Have a nested subform (subform2) which simulates a continuous form for the
record on the parent subform.
Subform2 has rows of either an option button plus two text fields or a
checkbox plus two text fields
Am wanting to save the user entries into an underlying table. Tag property
for each option button, check box or text field has the value of the key
|
by: natwong |
last post by:
Hi All,
I'm a newbie in terms of Access and some of its functionality . I've been stuck on this problem for a couple days, even after searching the Web, etc.
Currently I have five combo boxes (actually list boxes) that are multiselects in my main form. I need to use these combo boxes to filter a subform within my main form.
My combo boxes are as follows:
1. A - 4 select options
2. B - 10 select options
3. C - 4 select options
| |
by: Phil |
last post by:
I've posted this a few times without any luck, hoping for some fresh
ideas on this. I'm pretty certain this can be done.
I've been using a micrsoft template to create a supplier database
called the Inventory management database, I have changed this so that
there is a link in the relationships with the suppliers so that every
product entered has a specific supplier related, thats fine the main
problem I've encountered is setting up the...
|
by: virtualgreek |
last post by:
Dear All,
First of all I would like to take the time to thank you all for your efforts and time spent at this wonderful forum. I have found it very helpful with numerous examples available for every level of user.
I am facing a rather weird behaviour with a combo box on a subform (Continuous form).
I have two tables. Order and Order_Details. The master form is based on the Orders tables and the details form (subform) is based on the...
|
by: lawton |
last post by:
Source: this is an access 2003 question
My knowledge level: reading books, internet, and trial & error; no formal training
I'm trying to get a running sum of what's filtered in a subform which is ultimately driven by the results of two combo boxes: 1st combo box on main form that filters desired results for 2d combo box on sub form
Main form: no record source. Has an unbound combo box.
name: frminput
combo name: cboAccounts
The row...
|
by: kcdoell |
last post by:
Hello:
I have a form (Default view =single form) with a subform (Default view =continuous forms) embedded into it. In the form I have three controls that display the Division, Working Region & Credit Region. The subform displays the data/records. The record source for both my form and subform is driven by a query, which is the way I filter the records that the end user will see via another form I created.
Everything is working fine but...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |