Continous formswith combo boxes

G

Guest

I have a Continous form that contains a combo box as a field within the row
of data.

Based on the selection on the combo box a field within that row is being
changed (by design). The resulted field on the row is being changed properly.

The problem is this....
When I change the combo box on one row the value of that combo box is
changed to the same on all the rows. The resulting changing field is only
changed on the proper row, but with all the combo boxes changing makes it a
misleading.

Thanks,
 
S

Steve Schapel

Stickandrock,

This is apparently an unbound combobox, and if so, what you are
describing would be the expected behaviour. Are you able to put the
combobox in the Form header, so you only see one copy of it? Or put the
form as a subform onto another form, and put the combobox on the other
form instead?

Otherwise, I must say this is an unusual process you are doing here.
Maybe if you would give some more details, with examples, about what you
are really trying to achieve, someone may be able to suggest another
simpler way of doing it.
 
G

Guest

sample Data
Table 1 (Donations)
donation ID,Recipient ID,Amount
1,222,100.00
2,333,250.00

Table 2 (Recipients)
Recipient ID,First Name, Last Name
222,Joe,Brown
333,Bob,Smith
444,Mary,Jane

Continous Forms Output
DonationsID(Bound),Donations.RecipientID(Bound),Donations.Amount(Bound),Last
Name(Combo box distinct sql against Recipients Table. Last Name),First
Name(Combo box distinct sql against Recipients Table. First Name within the
matching Last Name)

Data output
1 222 100.00 cmb1 cmb2
2 333 250.00 cmb1 cmb2

if i change cmb1 on donation1 to Mary then both rows change to Mary

Desired result would be to change cmb1 and cmb2 and have vb code that will
set the value of field2 to 444. Which this does work just fine, but the
multiple combo row changing is was is misleading.

The main query is designed to be dynamic for any recipient.

Hope this explain things.
 
S

Steve Schapel

Stickandrock,

Thanks for the further explanation.

I would recommend against this approach. Using VBA code in this way is
inappropriate.

I guess one factor is how importatn/relevant is it to actually see the
Recipient ID on this Donations form? In many database scenarios, this
ID value is meaningless to humans, and not displayed on forms. If this
is the case, I would use a combobox on the form bound to the Recipient
ID field, but set up (via the appropriate settings of the Column Count
and Column Widths properties) to show the recipient's name rather than
the ID (even though the ID is the bound value). If, on the other hand,
you do want to see the ID on the form, I would use one of the methods as
explained in this article...
http://accesstips.datamanagementsolutions.biz/lookup.htm
 

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