473,461 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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
http://hmoulding.cjb.net/ with a weird name

Nov 13 '05 #1
1 1180
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
http://hmoulding.cjb.net/ with a weird name

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Crystal | last post by:
Ok, I know this sounds weird, but it's really bugging me. I have a few list boxes on my form (basic pick a month, year, state stuff) and you can only choose one value. I need to be able to run a...
1
by: Andrew V. Romero | last post by:
I have a script that I am working on for an intranet tool and in this script I have a form, which when submitted the onSubmit command calls calculate(). In this calculate function, I have it do...
1
by: Jonatan | last post by:
Hi all, I'm trying to upload files doing something like gmail. I almost got it but I have a problem when I post the form. Basicaly, I am doing the following. When the user presses the link...
1
by: John Doe | last post by:
I have a PHP page that generates a list box with several options in it. I would like to have a "view" link next to the list box. When the user changes the contents of the list box, I would like...
3
by: Mark C | last post by:
I have a unbound form with a tab control with four tabs in an Access 97 database. On each tab I have a sub form each form on the sub forms is bound to its own table. Each table has a field that can...
1
by: Henry | last post by:
I hope someone can help me on this. I have two controls on a form. the first is a comboBox the second is a datagrid. Both controls are bound to tables in a common dataset. What I am trying to...
6
by: Rod Snyder | last post by:
I'm trying to set up a page with an asp.net link button that would send a user to a certain page and on page load execute a specific stored procedure tied to the button on the previous page. The...
4
by: kschneider | last post by:
Assume there's a form with it's action attribute all set to post to a URL, but without a submit control. Form submission is done via a link and I want to prevent the classic "double submit"....
5
by: Amoril | last post by:
I've read quite a few different message on various boards and for some reason I'm still having trouble wrapping my head around this viewstate maintenance and trying to get these dynamically created...
14
by: Wouter | last post by:
Hi, I try to make the follow. I want that i can click on a text link and that then a link wil be copyed in a input form box (<input type="text" name="img_url" />). I have google-ed about how...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.