A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Search box to filter subform records, using LIKE criteria



 
 
Thread Tools Display Modes
  #1  
Old September 6th, 2008, 12:15 AM posted to microsoft.public.access.forms
CSOUSA
external usenet poster
 
Posts: 5
Default Search box to filter subform records, using LIKE criteria

Hi!

I am trying to make a text-box search on a Main Form that will filter the
Subform Records (which are displayed from a PRODUCT/TECH ISSUES Query). They
would be filtered using Product Number. The full product number is about 9
characters, but it would be ideal for the user to be able to enter only the
first 3 characters (indicating the product family) or the first 7 characters
(for family + version) and find ALL query records relating to the entire
family, family +version, etc. This way they can see all TECH ISSUES for the
whole family or version, not just a specific revision.

For example, there may be a product ABC1234-XY-Z1 and a product
ABC1234-YZ-A2, but I want to see ALL query tech issues for products starting
in ABC or ABC1234 or ABC1*, etc. (Whichever the user decides to enter.)

I am generally skilled in access but only mildy familiar with VB. What
would be the best way to do this?

Thanks and all the best...
  #2  
Old September 6th, 2008, 06:39 AM posted to microsoft.public.access.forms
Piet Linden[_2_]
external usenet poster
 
Posts: 280
Default Search box to filter subform records, using LIKE criteria

On Sep 5, 6:15*pm, CSOUSA wrote:
Hi!

I am trying to make a text-box search on a Main Form that will filter the
Subform Records (which are displayed from a PRODUCT/TECH ISSUES Query). *They
would be filtered using Product Number. *The full product number is about 9
characters, but it would be ideal for the user to be able to enter only the
first 3 characters (indicating the product family) or the first 7 characters
(for family + version) and find ALL query records relating to the entire
family, family +version, etc. *This way they can see all TECH ISSUES for the
whole family or version, not just a specific revision.

For example, there may be a product ABC1234-XY-Z1 and a product
ABC1234-YZ-A2, but I want to see ALL query tech issues for products starting
in ABC or ABC1234 or ABC1*, etc. (Whichever the user decides to enter.)

I am generally skilled in access but only mildy familiar with VB. *What
would be the best way to do this?

Thanks and all the best...


SELECT ...
FROM MyTable
WHERE MyField LIKE [Enter A string:] & "*"
  #3  
Old September 11th, 2008, 12:19 AM posted to microsoft.public.access.forms
CSOUSA
external usenet poster
 
Posts: 5
Default Search box to filter subform records, using LIKE criteria



"Piet Linden" wrote:

On Sep 5, 6:15 pm, CSOUSA wrote:
Hi!

I am trying to make a text-box search on a Main Form that will filter the
Subform Records (which are displayed from a PRODUCT/TECH ISSUES Query). They
would be filtered using Product Number. The full product number is about 9
characters, but it would be ideal for the user to be able to enter only the
first 3 characters (indicating the product family) or the first 7 characters
(for family + version) and find ALL query records relating to the entire
family, family +version, etc. This way they can see all TECH ISSUES for the
whole family or version, not just a specific revision.

For example, there may be a product ABC1234-XY-Z1 and a product
ABC1234-YZ-A2, but I want to see ALL query tech issues for products starting
in ABC or ABC1234 or ABC1*, etc. (Whichever the user decides to enter.)

I am generally skilled in access but only mildy familiar with VB. What
would be the best way to do this?

Thanks and all the best...


SELECT ...
FROM MyTable
WHERE MyField LIKE [Enter A string:] & "*"


Thanks, how genius, of course it worked!

And much easier than linking it to a text box on a form, while yielding the
same results. Now I have a macro to filter by this query OnOpen and it
brings up the prompt just fine.

: )


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:42 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.