Combo box/ Subform question

M

msalguod

Can someone please explain to me what is happening here?

I have a form with an embedded subform. The form and subform are
linked by "SongTitle" field. The form has a combo box to select a
song title. Whatever title is selected, the subform is filled with
details about that song. If I go to the subform and edit any of the
fields, the title of the FIRST record in the table is overwritten with
the last text that was selected in the combo box.

It doesn't happen if I change the combo box to a text box.

I'm just trying to figure out what I'm missing here. Is this
supposed to happen or is this a bug of some sort?

And how can I prevent it?


Thanks
 
J

John Vinson

The form has a combo box to select a
song title. Whatever title is selected, the subform is filled with
details about that song. If I go to the subform and edit any of the
fields, the title of the FIRST record in the table is overwritten with
the last text that was selected in the combo box.

The problem is that your Combo Box is *bound* to the Song Title field
in your table. A combo box intended to find a record should be unbound
- its Control Source property should be blank. You can either use the
toolbox combo wizard option "use this combo to locate a record" in
order to have it navigate to that record on the mainform (the subform
will follow); or if there are no other fields on the mainform, simply
use an unbound main form and set the Master Link Field property of the
subform to the name of the combo box.

John W. Vinson[MVP]
 

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