Having read some other posts its obvious I'm way out of my depth here, but
I'd still like to have a go.
My main table is called 'Recordings' and includes a field labeled 'Composer'.
A second table called 'Composers' contains just two fields, a unique ID and
a text field called 'Composer Name'. There is no relationship between the
tables.
I created a new form and followed the Access help in creating a combo box
(used the toolbar icon, created the field in the form, and answered the
wizard questions)
The combo box was setup with the following wizard properties:
1. I want the combo box to look up the values in a table or query.
2. Selected Table: Composers
3. Selected Field: Composer Name
4. Selected column width: Best Fit
5. Store that value in this field: Composer
6. Combo box label: Combo21
7. Changed Combo21 Property box 'Limittolist' to YES
8. Changed Combo21 Property box 'Onnotinlist' to [Event procedure]. Access
Help says Access will automatically add the entry into the source table, but
it doesn't. So I opened the [Event procedure] VB window.
Now what?
Almost every page in the Access Help files says that code must be entered,
but I'll be darned if I can find what code to enter! I hope you have enough
patience to help, Wolfgang! Thank you
Wolfgang Kais said:
SPBmrmusic.
SPBmrmusic said:
Created a combo box that looksup a table. Works fine. Can add
entries by selecting 'No' in Limittolist. Works fine. I seem incapable
of making Access add the new entry into the source table!
Using ado or dao?
Please explain the exact code/ [event procedure] that is required,
along with the exact setup in both tables' field properties
(just to make sure I get it absolutely right).
The tables were set up by you, weren't they?
You should explain exactly, how the combobox has been set up.