ComboList Query Search

F

Funkydan

Dear All,

Im Back again,

I Need some help on creating some sort of query which displays results
of company's that are assigned a service type.

With in my Companies Contract Table i Have a Service Combo Dropdown
List(Field), which has a List of different services, ie Ductwork,
Pipework, Insulation, Boilers, Pumps, etc. The Different Services are
stored in a Seperate Table Called Services.

What Im Trying to do is, with on a seperate form, is have the same
dropdown menu with a search button. next to it, which when a user
Selects one of the services then press's Search, a new form opens up
and displays results of companys that are assigned to that Service.

Ive all Ready created a Query, and at the moment i have [Type Service]
in the criteria field in the design view in under service Field. But
this Creates a Parameter Search Box, and dont want this,

can some one assist me Please!!

Regards |

Danny
 
F

Funkydan

Funkydan said:
Dear All,

Im Back again,

I Need some help on creating some sort of query which displays results
of company's that are assigned a service type.

With in my Companies Contract Table i Have a Service Combo Dropdown
List(Field), which has a List of different services, ie Ductwork,
Pipework, Insulation, Boilers, Pumps, etc. The Different Services are
stored in a Seperate Table Called Services.

What Im Trying to do is, with on a seperate form, is have the same
dropdown menu with a search button. next to it, which when a user
Selects one of the services then press's Search, a new form opens up
and displays results of companys that are assigned to that Service.

Ive all Ready created a Query, and at the moment i have [Type Service]
in the criteria field in the design view in under service Field. But
this Creates a Parameter Search Box, and dont want this,

can some one assist me Please!!

Regards |

Danny

PROGRESSION

Ive Created A Combolist Box, Called "SL" Which I Created Using the
Combo Wizard And it Looks up all Data in a table Called "Service"

The Combox List Box "SL" is Created on a Form Called "ServiceSearch"

Then I Also Created a Query Which Shows all the Same Fields as The Main
Company Table. Query is callled "ServiceResults"

Then I Also Created a Form, Which Displays the Query Results Form
Called "ServiceCompany"

In Design View of the Query "ServiceResults" Under Column Service and
in Field Critera I Types the Following

=[Forms]![ServiceSearch]![SL]

When I Go back to the ServiceSearch Form, And Which I Created a Button
to open "ServiceCompany" which should display The Results of the Item
Selected in the Drop down, Instead once clicked the button and
Parameter Box is Displayed Saying. "Forms!ServiceSearch!SL" But when i
type one of the drop down items in the box it works?

Im confused?
 
F

Funkydan

Really Sorry,

But Im Struggling to Try and understrand, what you mean?

Are Saying to remove the The Crietera Function, from the Query and
leave it Blank? and then open the Form Which has the Combo Dropdown,
and Button? and Open the VB on the selected button and Type that
Following Code:

Or is there a Small Demo database showing this, what im trying to
achieve? i download?

Danny
(e-mail address removed)
Remove the criteria from the query.
Use the Where Conditioni argument of the OpenForm method to filter on the
selected service. It would be something like this:

DoCmd.OpenForm "MyFormName", , , "[Type Service] = '" & Me.cboSericeType
& "'"

[Type Service] should be the name of the field in the query that identifies
the type of service.

cboServiceType should contain the types of service that would be in the query.

--
Dave Hargis, Microsoft Access MVP


Funkydan said:
Dear All,

Im Back again,

I Need some help on creating some sort of query which displays results
of company's that are assigned a service type.

With in my Companies Contract Table i Have a Service Combo Dropdown
List(Field), which has a List of different services, ie Ductwork,
Pipework, Insulation, Boilers, Pumps, etc. The Different Services are
stored in a Seperate Table Called Services.

What Im Trying to do is, with on a seperate form, is have the same
dropdown menu with a search button. next to it, which when a user
Selects one of the services then press's Search, a new form opens up
and displays results of companys that are assigned to that Service.

Ive all Ready created a Query, and at the moment i have [Type Service]
in the criteria field in the design view in under service Field. But
this Creates a Parameter Search Box, and dont want this,

can some one assist me Please!!

Regards |

Danny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top