Form filter using linked data

  • Thread starter greeknl via AccessMonster.com
  • Start date
G

greeknl via AccessMonster.com

Is it possible to filter a form (based on table A) on a value in a table B
where the tables are linked?

Table A
ID
lastname
firstname
companyid
...

Table B
companyid
companyname
...

I would like to filter the form records (Table A) by using as input the
company name (or part of it) from a textbox.
I would like to use like
frm.Filter =
as I already use it to filter the form based on values from another txtbox on
the lastname
 
G

Guest

I am assuming that you mean that you have a form and a subform which both
point to different tables (it should not matter if the underlying table is
linked or local).

You just need to set the child/master fields of the subform to look at the
value for a specific field to filter the values. It should happen
automatically this way.

Please let me know if I can provide more assistance.
 
G

greeknl via AccessMonster.com

No, I have no subform but I use a combobox to let the user select the way he
wants to filter the available records and then selects the companyname in
another combobox which is depended on the first one.
When he/she selects the company name which is in a linked tabled the filter
in vba "frm.fliter" doesn't work properly
Hoe can I set the vba command as to filter the records on the comapnyname
selected
I am assuming that you mean that you have a form and a subform which both
point to different tables (it should not matter if the underlying table is
linked or local).

You just need to set the child/master fields of the subform to look at the
value for a specific field to filter the values. It should happen
automatically this way.

Please let me know if I can provide more assistance.
Is it possible to filter a form (based on table A) on a value in a table B
where the tables are linked?
[quoted text clipped - 17 lines]
as I already use it to filter the form based on values from another txtbox on
the lastname
 
G

Guest

Since you are using a combobox instead of a subform, you will need to adjust
the RowSource property rather than using frm.filter. You will also want to
requery the combobox after you adjust the rowsource.

greeknl via AccessMonster.com said:
No, I have no subform but I use a combobox to let the user select the way he
wants to filter the available records and then selects the companyname in
another combobox which is depended on the first one.
When he/she selects the company name which is in a linked tabled the filter
in vba "frm.fliter" doesn't work properly
Hoe can I set the vba command as to filter the records on the comapnyname
selected
I am assuming that you mean that you have a form and a subform which both
point to different tables (it should not matter if the underlying table is
linked or local).

You just need to set the child/master fields of the subform to look at the
value for a specific field to filter the values. It should happen
automatically this way.

Please let me know if I can provide more assistance.
Is it possible to filter a form (based on table A) on a value in a table B
where the tables are linked?
[quoted text clipped - 17 lines]
as I already use it to filter the form based on values from another txtbox on
the lastname
 

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