C
calum112 via AccessMonster.com
I've been patient with this one as I managed to solve my last one on my own,
straight after posting it. However nothing I can think of / try works and I'm
sure what I've got it right (although it's obviously not).
It's pretty simple:
Table 1 called ' table1' has two fields 'companyid' and 'manufacturer'
Table 2 called 'table2' also has the field 'companyid' of which relates each
record to one/more manufacturers, through the above table.
I want to be able to filter table2 to show all of the records relating to a
certain manufacturer.
There is a text box (manufacturerlist) in the footer of table where you type
the manufacturer and a go button next to it to activate the filter.
I've put this code in the 'where' condition for the filter:
[Forms]![table2]![companyid]=DLookUp ([companyid],"table1","[table1]!
[manufacturer]=Forms![table2]![manufacturerlist]")
So it shows all records in table2 where the companyids match table1 for that
manufacturer.
Yet it doesn't work; if manufacturerlist and table1 have nothing in common it
doesn't show any reocrds (correct) however if there is one or more in common
then it just shwos record one in table2, regardless if what is chosen.
straight after posting it. However nothing I can think of / try works and I'm
sure what I've got it right (although it's obviously not).
It's pretty simple:
Table 1 called ' table1' has two fields 'companyid' and 'manufacturer'
Table 2 called 'table2' also has the field 'companyid' of which relates each
record to one/more manufacturers, through the above table.
I want to be able to filter table2 to show all of the records relating to a
certain manufacturer.
There is a text box (manufacturerlist) in the footer of table where you type
the manufacturer and a go button next to it to activate the filter.
I've put this code in the 'where' condition for the filter:
[Forms]![table2]![companyid]=DLookUp ([companyid],"table1","[table1]!
[manufacturer]=Forms![table2]![manufacturerlist]")
So it shows all records in table2 where the companyids match table1 for that
manufacturer.
Yet it doesn't work; if manufacturerlist and table1 have nothing in common it
doesn't show any reocrds (correct) however if there is one or more in common
then it just shwos record one in table2, regardless if what is chosen.