Select Query Not functioning

G

Guest

I have a table called Warning Details. In this table there are 5 fiels
(FileID, ActRegId, LegislationID, Description, Gravity). In the rowsource
property of the ActRegID field I hae entered the following line (which works
wonderfully):

SELECT DISTINCTROW [ActRegID], [Acts and Regulations] FROM [Acts/Regs];

Once a selection has been made from the ActRegID field I want to have the
items listed in the LegislationID field limited to only those which pertain
to the ActRegID selection. I have attempted to do this by using the
following line in the rowsource property of the LegislationID field:

SELECT LegislationID, Section FROM Legislation WHERE
(((Legislation.ActRegID)=ActRegID));

This line does not work as intended. Regarless of what is selected in the
ActRegID field, all items in the table "Legislation" are available in the
LegislationID field.

Can someone please help me and show me the error in my ways?

Any help would be greatly appreciated.

Z
 
G

Guest

I'm not sure that you can use the Lookup tab in table design this way. I
think it's simply meant to provide a default when you drop this field onto a
form. To have dependencies between comboboxes, you need to do it at the form
level, not in the table.

Barry
 

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