Use cascading combos to add records?

LDeBlois

New member
Local time
Today, 21:11
Joined
Dec 19, 2001
Messages
6
I have a form where I placed 2 (cascading) combos in the header. The 1stcombo reviews Table1, and the 2ndcombo from Table2. The detail section is also from Table2.
My problem is, if I need to add a new record, I can't do it through the header (right)? I can add a record in the detail section, but how do I get to add the 1st criteria (combo1) to Table1? (Table2 is supposed to lookup its first vaue from Table1).
I can't figure this out. Can anyone help me?
 
Last edited:
I'm assuming that combo2 is filtered by the value in combo1. To add to table 1, use the NotInList event of combo1 then when you type a new value in the combo, yo can do 1 of 2 things. Open a new form to input data into table1 or autoadd the new entry into table1. However, when you do this, there will be no matching records in combo2 so it will remain null.

Is this helpful?
 
Yes, I think this is what I want to do.

So, I should set the Limit to List Property to Yes, and in the On Not in List event, I am assuming I need to run a macro to add the new record to table1?

I don't know the code to write, so I tried the Macro Builder but I don't see and AutoAdd function.

Can you get me through this?

Thanks for you help!
 
Here's a sample that you might find useful. The first combo fills using the NotInList event direct to the base table. The second combo used the NotInList event to add the data through a second form, that also picks up the information from the 1st combo
 

Attachments

Users who are viewing this thread

Back
Top Bottom