Use cascading combos to add records? (1 Viewer)

LDeBlois

New member
Local time
Today, 12:32
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:

Fizzio

Chief Torturer
Local time
Today, 12:32
Joined
Feb 21, 2002
Messages
1,885
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?
 

LDeBlois

New member
Local time
Today, 12:32
Joined
Dec 19, 2001
Messages
6
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!
 

DBL

Registered User.
Local time
Today, 12:32
Joined
Feb 20, 2002
Messages
659
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

  • addtocascadingcombos.zip
    50.9 KB · Views: 453

Users who are viewing this thread

Top Bottom