Form Filtering Problems

K

KevinK

Hi
I have a SelectSupplierfrm that has a combo box called SupplierFilter.
There are two fields in this filter SupplierID and Supplier. This
SupplierFilter combo box has an After Update event to open the POBySupplier
form. This form has a sub form which will list all the historic purchase
orders from the supplier selected on the SelectSupplierfrm. I have used this
statement in the SupplierID field criteria behind the POBySupplierfsub sub
form.
[Forms]![SelectSupplierfrm]![SupplierFilter].Column(0)
This is the message I get from Access when I try to run these two forms
Undefined function ‘[Forms]![SelectSupplierfrm]![SupplierFilter].Column’ in
expression
What am I doing wrong?
 
B

BruceM via AccessMonster.com

You need to define a relationship between the Supplier table and the PO table.
I will assume a structure such as this:

tblSuppler
SupplierID
SupplierName
etc.

tblPO
PO_ID
SupplierID
PO_Date
etc.

SupplierID is the same data type in both tables. If it is autonumber in
tblSupplier, it must be Number (Long Integer) in tblPO).

The PO subform control has Link Child and Link Master properties. These need
to be set to SupplierID. Now each Supplier record will show only the POs for
that supplier.

Your posting does not provide much information about the database structure.
If this suggestion does not point you in the right direction, provide more
details about the database structure.

I am unsure where you tried to apply the criteria, but in any case a filter
or criteria is not needed. Rather, use the relational capabilities of Access
to link subform records to the current main form record.
Hi
I have a SelectSupplierfrm that has a combo box called SupplierFilter.
There are two fields in this filter SupplierID and Supplier. This
SupplierFilter combo box has an After Update event to open the POBySupplier
form. This form has a sub form which will list all the historic purchase
orders from the supplier selected on the SelectSupplierfrm. I have used this
statement in the SupplierID field criteria behind the POBySupplierfsub sub
form.
[Forms]![SelectSupplierfrm]![SupplierFilter].Column(0)
This is the message I get from Access when I try to run these two forms
Undefined function ‘[Forms]![SelectSupplierfrm]![SupplierFilter].Column’ in
expression
What am I doing wrong?
 

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