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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using a query to populate a search form



 
 
Thread Tools Display Modes
  #1  
Old February 28th, 2007, 12:17 AM posted to microsoft.public.access.queries
mikeinohio
external usenet poster
 
Posts: 58
Default Using a query to populate a search form

I have a query that i want to use to look up parts by part number, every
part has 20 related field in this query, i want to use a textbox to type
the part number and use a command button to execute the search that will then
populate the remaining fields, how should this be done
  #2  
Old February 28th, 2007, 12:55 AM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Using a query to populate a search form

Use a form.

Add a combo box that lists all parts.

Bind the form to a query that returns the part-related fields, but only for
the part selected in the combo box.

In the AfterUpdate event of the combo box, requery the form:
Me.Requery

Now you have a form that lets the user select a part and see the
part-related field values.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"mikeinohio" wrote in message
...
I have a query that i want to use to look up parts by part number, every
part has 20 related field in this query, i want to use a textbox to type
the part number and use a command button to execute the search that will
then
populate the remaining fields, how should this be done



  #3  
Old February 28th, 2007, 04:36 AM posted to microsoft.public.access.queries
mikeinohio
external usenet poster
 
Posts: 58
Default Using a query to populate a search form

Thanks Jeff, the part numbers either start with a number or a such as 1,2,3,
etc... or they start with a "#" then numbers or letters, will this still work?

"Jeff Boyce" wrote:

Use a form.

Add a combo box that lists all parts.

Bind the form to a query that returns the part-related fields, but only for
the part selected in the combo box.

In the AfterUpdate event of the combo box, requery the form:
Me.Requery

Now you have a form that lets the user select a part and see the
part-related field values.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"mikeinohio" wrote in message
...
I have a query that i want to use to look up parts by part number, every
part has 20 related field in this query, i want to use a textbox to type
the part number and use a command button to execute the search that will
then
populate the remaining fields, how should this be done




  #4  
Old February 28th, 2007, 06:20 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Using a query to populate a search form

You can use whatever you want as the row source in a combo box...

What happens when you try it?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"mikeinohio" wrote in message
...
Thanks Jeff, the part numbers either start with a number or a such as
1,2,3,
etc... or they start with a "#" then numbers or letters, will this still
work?

"Jeff Boyce" wrote:

Use a form.

Add a combo box that lists all parts.

Bind the form to a query that returns the part-related fields, but only
for
the part selected in the combo box.

In the AfterUpdate event of the combo box, requery the form:
Me.Requery

Now you have a form that lets the user select a part and see the
part-related field values.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"mikeinohio" wrote in message
...
I have a query that i want to use to look up parts by part number,
every
part has 20 related field in this query, i want to use a textbox to
type
the part number and use a command button to execute the search that
will
then
populate the remaining fields, how should this be done






 




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 08:58 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.