list box is not populating my table

  • Thread starter Thread starter Paulette Boyd via AccessMonster.com
  • Start date Start date
P

Paulette Boyd via AccessMonster.com

I have a form to add a record. On this form, I have a combo box that when
clicked populates a listbox. Well, all the fields on my add record form
are being created in the table EXCEPT the value in the list box.

Does anyone know why?
 
Paulette,

The listbox does not add records - it only displays them. If you want to add
a record to a table, you'll have to do it by other means.

What (specifically) are you trying to do?

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
I have a combo box with a list of company names. When I click on the name
in the combo box it finds the matching alias associated with the company
name. When I click on the add record button, all the fields are added to
the table except the listbox value.
 
Paulette,

You'll have to show us the code behind the button.

1. Open the form in design view.
2. From the View menu, select Properties.
3. Select the Event tab.
4. Click the button in question.
5. In the Properties dialog, click in the OnClick textbox (where it says
"[Event Procedure]").
6. Then click right-hand button that appears (the one with three dots).
7. Copy everything between
Private Sub myButton_Click()
and
End Sub
...and post it here.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
I have no code behind the event. When the user click on the combo box a
drop down of company names appear. Once clicked, I would like the textbox
to prefill with the associated alias.

I have a query tied to the form and both the company name and alias is in
the query.

Do you have code that would populate the textbox after the combo box is
clicked?

Thanks much!!
 
Pauline,

This is now different to the way you described it initially. The solution
now depends on several factors.

Let us know the following information:
* The combo's RowSource property
* The combo's ControlSource property
* The combo's BoundColumn property
* The name of the textbox you want to put the text into

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Back
Top