Inserting data via form using multiselect ListBoxes

A

Alp Bekisoglu

Hi Experts,

Using A2K. I have an unbound form (fr_trial) with following controls:
fr_dt: a date field, default set to Now()
fr_desc: a text field for description entry
chk9: a checkBox, default set to 0, asking if selection will be made

If chk9 is checked the following buttons are displayed:
Single
Multi

If Single is clicked the following is displayed:
cboCountry: a comboBox, source queries the co_main table for country names
(grouped)
cboCity: a comboBox, source queries the co_main table for city names
(grouped) based on cboCountry

or if Multi is selected:
lboCountry: a ListBox, source queries the co_main table for country names
(grouped), set to simple
lboCity: a ListBox, source queries the co_main table for city names
(grouped) based on cboCountry, set to simple

The intention:
First to give user the option to select a source data, then to insert
"fr_dt" and "fr_desc" values into tb_tracker table for each company that
matches the above selections from co_main table together with the "co_id"
from co_main.

I can open up a query based on the selection using queryDef with the above
info via code but got stuck at that stage! I think it should be quite easy
to sum up an INSERT INTO query from here on but...

Any pointers, guidance will be highly appreciated.

Thanks in advance,

Alp
 
R

Rob Oldfield

Creating a query on the fly is definitely a workable solution. Could you
post the code that you're currently trying?
 

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