By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,249 Members | 1,853 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,249 IT Pros & Developers. It's quick & easy.

How do I link a control to the value in a form?

P: n/a
I'm not talking about a bound control. That's something I've
already figured out.

I have a form that I use to add and update items in a table.
Each item can be of one or more types, so there's a separate
table that lists the possible types, and another table that
cross connects rows in the item table to the type table. The
form has a drop-down list for all possible types, with a
button that runs a script to add a row to the cross connect
table for adding a new type to the current item. A text box
is linked to another script that creates a comma separated
list of all types assigned to the current item.

I want to add a drop-down list that contains the same
information as the text box, except so that each type has its
own row, with the intent that I can select one of the assigned
types and click another button to remove it from the item
(and delete the corresponding row from the cross connect table).

I can set up the drop-down list with a query that finds all
items assigned to any items, but I haven't been able to figure
out how to limit the query to the currently selected item. It
seems to me that it should be simple. I figure there's either a
way to pass the current item's ID to the query, or to set up a
script that returns a record set that can be used by the drop-
down control. I just haven't found how to do either.

Can anyone provide me with helpful pointers?
Helge Moulding
hmoulding at gmail dot com Just another guy with a weird name

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
I seem to be answering some of my own question. I can now get the
list box to show what I want by adding

WHERE items_table.item_id=forms!form_item_entry!item_id;

to the query that's the data source for the list. However, when
I bump the form to the next item, the list box isn't refreshed
properly. That is, when I first start up the form, and it
displays the first item in the table, the drop-down list also
shows the correct types. However, when I advance the form to
the next item, the drop-down list's contents doesn't change.

I probably need to attach an event trigger somewhere, but I'm at
a loss where it should go.
Helge Moulding
hmoulding at gmail dot com Just another guy with a weird name

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.