relating list boxes to each other

P

pops

I have a subform that requires entries into a
table, "Subtype".
The listbox used as a row source should be populated
based on a previous entry into table, "Type".

The entry into the "Type" table is based on a rowsource
table, "Zlookup: Type".

I have another zlookup table, Zlookup: "Subtype" that
lists all of the Types and their associated Subtypes. I
am trying to use this table as the source data for
the "Subtype" list box.

Trying to decipher other sources, the following is what I
came up with for the row source line in the property box
for the subtype subform - and it doesn't work.

SELECT [Zlookup: Subtype].Subtype, [Zlookup:
Subtype].Code FROM [Zlookup: Subtype] WHERE
((([type].Type)=([type].[type])=[forms]![type]![type]));

I am totally confused.
Please help
 
S

Stewart Tanner

mate, you sure have made things hard on yourself. don't use the same name
for multiple objects, have a look at naming conventions to help identify
what object is being referred to. That expression
((([type].Type)=([type].[type])=[forms]![type]![type])); makes my teeth ache
just reading it.
tblType for Table Name
tblSubType for TableName
frmType for formName
strType for fieldname

apart from that the SQL string
SELECT [Zlookup: Subtype].Subtype, [Zlookup: > Subtype].Code FROM
[Zlookup: Subtype] WHERE
((([type].Type)=([type].[type])=[forms]![type]![type]));

does not make sense your criteria line references table type when it is not
part of the select statement. Is field type in the table "Zlookup:
Subtype"?
 

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