473,325 Members | 2,860 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,325 software developers and data experts.

immediate filtering

Hi,

I would like that my subform is immediately filtered as soon as one types a
letter in an unbound searchbox in the form.
If one types an 's' the content of the subform shows only records starting
with s
If one continues with 'e' the subform would show the ones starting with se.
If one would correct that to 'e' by going back and removing the 's' the
records would start with an e.

Any suggestions?

Thanks in advance

Michiel

Jun 27 '08 #1
8 1272
On Thu, 24 Apr 2008 20:20:11 GMT, "Michiel Rapati-Kekkonen"
<nn@nonsense.zzwrote:

Write your code in the <control>_Change event.
-Tom.

>Hi,

I would like that my subform is immediately filtered as soon as one types a
letter in an unbound searchbox in the form.
If one types an 's' the content of the subform shows only records starting
with s
If one continues with 'e' the subform would show the ones starting with se.
If one would correct that to 'e' by going back and removing the 's' the
records would start with an e.

Any suggestions?

Thanks in advance

Michiel
Jun 27 '08 #2
great
and thank you
(Dank je)

Michiel
"Tom van Stiphout" <no*************@cox.netwrote in message
news:ra********************************@4ax.com...
On Thu, 24 Apr 2008 20:20:11 GMT, "Michiel Rapati-Kekkonen"
<nn@nonsense.zzwrote:

Write your code in the <control>_Change event.
-Tom.

>>Hi,

I would like that my subform is immediately filtered as soon as one types
a
letter in an unbound searchbox in the form.
If one types an 's' the content of the subform shows only records starting
with s
If one continues with 'e' the subform would show the ones starting with
se.
If one would correct that to 'e' by going back and removing the 's' the
records would start with an e.

Any suggestions?

Thanks in advance

Michiel
Jun 27 '08 #3
butbut, how do I know what is in the box?
at the moment of the Change event the content of the control is not yet
recognized.
Or I donot know how to get it from it...

Michiel

"Tom van Stiphout" <no*************@cox.netwrote in message
news:ra********************************@4ax.com...
On Thu, 24 Apr 2008 20:20:11 GMT, "Michiel Rapati-Kekkonen"
<nn@nonsense.zzwrote:

Write your code in the <control>_Change event.
-Tom.

>>Hi,

I would like that my subform is immediately filtered as soon as one types
a
letter in an unbound searchbox in the form.
If one types an 's' the content of the subform shows only records starting
with s
If one continues with 'e' the subform would show the ones starting with
se.
If one would correct that to 'e' by going back and removing the 's' the
records would start with an e.

Any suggestions?

Thanks in advance

Michiel
Jun 27 '08 #4

"Michiel Rapati-Kekkonen" <nn@nonsense.zzwrote in message
news:%X**************@read4.inet.fi...
Hi,

I would like that my subform is immediately filtered as soon as one types
a letter in an unbound searchbox in the form.
If one types an 's' the content of the subform shows only records starting
with s
If one continues with 'e' the subform would show the ones starting with
se.
If one would correct that to 'e' by going back and removing the 's' the
records would start with an e.

Any suggestions?

Thanks in advance
What you describe is the way that Combo Boxes work with their AutoExpand
property set to Yes (the default setting). If you would clarify what you
are attempting to accomplish, rather than how you intended to accomplish it,
perhaps someone could make a useful suggestion. Perhaps you might even use
a Combo Box, instead of a continuous forms view Form embedded in a Subform,
to perform the function you want.

Tom is correct... I am certain you can, with expenditure of time and effort,
re-implement the AutoExpand functionality for your Subform (the examples of
which I have read did so for a List Box, though I cannot imagine why they
did not use a Combo Box instead).

If you cannot get at the current content, what VBA code are you using? The
complete contents of that text box should be available in the OnChange event
should be available as its Text property -- determining whether an
additional letter has been added, or a backspace deleted one, or the
contents cleared are what will make this more of a challenge than just using
a ComboBox, which has the added benefit of preventing you from going afar
off typing several letters of a non-existent term.

Larry Linson
Microsoft Office Access MVP

Larry Linson
Microsoft Office Access MVP
Jun 27 '08 #5

On Sun, 27 Apr 2008 09:23:48 GMT, "Michiel Rapati-Kekkonen" <nn@nonsense.zz>
wrote:
>butbut, how do I know what is in the box?
at the moment of the Change event the content of the control is not yet
recognized.
Or I donot know how to get it from it...

Michiel

Read the "Text" property of the control. It returns the current displayed
content of the control not the stored value.

strSearch = Me.MyCombo.Text
Wayne Gillespie
Gosford NSW Australia
Jun 27 '08 #6
Thank you
indeed I never used that property before!
Good to know, very good to know.

Michiel

"Wayne Gillespie" <be*****@NOhotmailSPAM.com.auwrote in message
news:rn********************************@4ax.com...
>
On Sun, 27 Apr 2008 09:23:48 GMT, "Michiel Rapati-Kekkonen"
<nn@nonsense.zz>
wrote:
>>butbut, how do I know what is in the box?
at the moment of the Change event the content of the control is not yet
recognized.
Or I donot know how to get it from it...

Michiel


Read the "Text" property of the control. It returns the current displayed
content of the control not the stored value.

strSearch = Me.MyCombo.Text
Wayne Gillespie
Gosford NSW Australia
Jun 27 '08 #7
Thanks for your extensive response,
but it was the Text property, I did not know about.
Now I know, and now it works the way I want it.

Thank you

Michiel
"Larry Linson" <bo*****@localhost.notwrote in message
news:IE3Rj.2321$Rk6.2285@trnddc07...
>
"Michiel Rapati-Kekkonen" <nn@nonsense.zzwrote in message
news:%X**************@read4.inet.fi...
>Hi,

I would like that my subform is immediately filtered as soon as one types
a letter in an unbound searchbox in the form.
If one types an 's' the content of the subform shows only records
starting with s
If one continues with 'e' the subform would show the ones starting with
se.
If one would correct that to 'e' by going back and removing the 's' the
records would start with an e.

Any suggestions?

Thanks in advance

What you describe is the way that Combo Boxes work with their AutoExpand
property set to Yes (the default setting). If you would clarify what you
are attempting to accomplish, rather than how you intended to accomplish
it, perhaps someone could make a useful suggestion. Perhaps you might
even use a Combo Box, instead of a continuous forms view Form embedded in
a Subform, to perform the function you want.

Tom is correct... I am certain you can, with expenditure of time and
effort, re-implement the AutoExpand functionality for your Subform (the
examples of which I have read did so for a List Box, though I cannot
imagine why they did not use a Combo Box instead).

If you cannot get at the current content, what VBA code are you using?
The complete contents of that text box should be available in the OnChange
event should be available as its Text property -- determining whether an
additional letter has been added, or a backspace deleted one, or the
contents cleared are what will make this more of a challenge than just
using a ComboBox, which has the added benefit of preventing you from going
afar off typing several letters of a non-existent term.

Larry Linson
Microsoft Office Access MVP

Larry Linson
Microsoft Office Access MVP

Jun 27 '08 #8

"Michiel Rapati-Kekkonen" <nn@nonsense.zzwrote
Thanks for your extensive response,
but it was the Text property, I did not know about.
Now I know, and now it works the way I want it.
Content is available in the .Text property or the .Value property (the
latter is the default property of a Control). It can be an interesting read
to learn the differences, but in the long run, may just be easier to try
..Value (or nothing, using the default to .Value) and then try .Text when
that doesn't do what you want.

Larry Linson
Microsoft Office Access MVP
Jun 27 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I...
2
by: Jon Davis | last post by:
How do I get the Immediate window back? It seems to be gone. Command window doesn't work. "View" menu items don't seem to show it Jon
3
by: Russell Stevens | last post by:
Can anyone tell me how to get to the immediate window in VS2005. The help file says (when debugging) to click Debug, Windows, Immediate. There is no Immediate window listed there, nor anywhere else...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
2
by: JUAN ERNESTO FLORES BELTRAN | last post by:
Hi you all, I am developping a python application which connects to a database (postresql) and displays the query results on a treeview. In adittion to displaying the info i do need to implement...
5
by: vul | last post by:
In VB6 I used to use Immediate Window to get or change values of variables. It is very convenient while debugging. I used drag and drop operation to paste the variable name into Immediate Window....
2
by: dgk | last post by:
Using VS2005 Standard Edtion, I have an Immediate window during ASP debugging. My co-worker, using VS2005 Team Edtion does not have an Immediate window. He does have a Command window, which is sort...
3
by: Harry Haller | last post by:
Hello, I want to implement a generic list which will be used to display 7 columns in a GridView. One should be able to sort, filter and page each of the 7 columns. Ideally the filter should be...
6
by: Frank Rizzo | last post by:
I am using the Immediate Window a lot to see the progress of the application. In VS2003, if your cursor was at the very bottom, the window would scroll down whenever something new showed up. If...
3
by: Rahul Babbar | last post by:
Hi, I have the following doubt. Suppose I use the execute immediate statement and the statement to be executed is a Select statement from the sysibm.sysdummy1 table which will always return...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.