Help on this please.Combobox for filter

L

ldiaz

I posted this question before, but as nobody answer me I have posted it again.
please


Can anyone help me with this:

I Have a Form Named: BonusForm and there I have combobox named LocationID ,
also I Have a subform named: IDEmployeesubform with many field, I want to
filter employee using LocationID, this Value is also in the subform, the
subform is pulling datas from a Query named: IDEmployeeQuery

can you please help me.

Thanks.
 
T

tina

try adding the LocationID combo box name to the subform control's
LinkMasterFields property, and add the matching field in the subform to the
subform control's LinkChildFields property.

hth
 
O

Ofer

One option
Create a reference to the combo in the record source of the sub form

Select * From IDEmployeeQuery Where [LocationID] =
Forms![BonusForm]![LocationID] Or Forms![BonusForm]![LocationID] Is Null

On the After update event of the combo, write the code
Me.IDEmployeesubform.Requery

If there is no value selected in the combo, it will display all the records,
if you don't want records to be displayed when the combo is empty, then
change the record source of the sub form to

Select * From IDEmployeeQuery Where [LocationID] =
Forms![BonusForm]![LocationID]
 
L

ldiaz

Hi Ofer, thank you so much..also for Lina thank you so much.

I have click YES in : Did this post answer the question?



--
Lorenzo Díaz
Cad Technician


Ofer said:
One option
Create a reference to the combo in the record source of the sub form

Select * From IDEmployeeQuery Where [LocationID] =
Forms![BonusForm]![LocationID] Or Forms![BonusForm]![LocationID] Is Null

On the After update event of the combo, write the code
Me.IDEmployeesubform.Requery

If there is no value selected in the combo, it will display all the records,
if you don't want records to be displayed when the combo is empty, then
change the record source of the sub form to

Select * From IDEmployeeQuery Where [LocationID] =
Forms![BonusForm]![LocationID]

--
\\// Live Long and Prosper \\//
BS"D


ldiaz said:
I posted this question before, but as nobody answer me I have posted it again.
please


Can anyone help me with this:

I Have a Form Named: BonusForm and there I have combobox named LocationID ,
also I Have a subform named: IDEmployeesubform with many field, I want to
filter employee using LocationID, this Value is also in the subform, the
subform is pulling datas from a Query named: IDEmployeeQuery

can you please help me.

Thanks.
 
O

Ofer

Your welcome, have a great week

--
\\// Live Long and Prosper \\//
BS"D


ldiaz said:
Hi Ofer, thank you so much..also for Lina thank you so much.

I have click YES in : Did this post answer the question?



--
Lorenzo Díaz
Cad Technician


Ofer said:
One option
Create a reference to the combo in the record source of the sub form

Select * From IDEmployeeQuery Where [LocationID] =
Forms![BonusForm]![LocationID] Or Forms![BonusForm]![LocationID] Is Null

On the After update event of the combo, write the code
Me.IDEmployeesubform.Requery

If there is no value selected in the combo, it will display all the records,
if you don't want records to be displayed when the combo is empty, then
change the record source of the sub form to

Select * From IDEmployeeQuery Where [LocationID] =
Forms![BonusForm]![LocationID]

--
\\// Live Long and Prosper \\//
BS"D


ldiaz said:
I posted this question before, but as nobody answer me I have posted it again.
please


Can anyone help me with this:

I Have a Form Named: BonusForm and there I have combobox named LocationID ,
also I Have a subform named: IDEmployeesubform with many field, I want to
filter employee using LocationID, this Value is also in the subform, the
subform is pulling datas from a Query named: IDEmployeeQuery

can you please help me.

Thanks.
 

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