The difficult I do immediately, the impossible takes a little bit longer.
Question (asked in the Newsgroups) :
Well, I thought I had finally figured out how to get my form to work the way I want it to. Meaning, on my form I want the following phone types to display as defaults:
Allen Browne’s code copies existing child records with its main record to a new record. You want to copy new child records with or without main record. To make the code *work for you* your child records are going to need a trigger, hence the need for a Phone Types table.
The subform has been set-up to *show* five fields. However, you can adjust your subform to automatically display as many or as few defaults as you like by checking/unchecking the Show check box. To display your default fields in a specific Order simply fill in a number, leaving it blank will make it random.
All my *hidden* fields have a back color of hot pink. I started doing this a long time ago so I could keep track of which fields I have hidden when in Design View. (Fortunately, no one has ever asked me to design a form in hot pink or I would have to change the backcolor of my *hidden* fields!)
As you can see the form pictured, it appears as though it is a single form but as you can see, in form design view, that it is actually a form/subform. However when you add a new record it will automatically add the above fields so the End-User will not have to add the defaults. This form is locked to show only those five, which the End-User can change should the Client have other phone numbers.
This database requires 2002 or above. Download sample file...
It doesn’t work. If I decide to add a new Client/Company I want it to automatically display the default phone types (which I would also like to be able to select the defaults to display). AND I don’t like subforms.
To do this you would need a combination of a single subform (however, no one will see it), a table to hold Phone Types and Allen Browne’s (Microsoft Access MVP) code.
Auto-Add new child records when adding a new record on Main (Parent) form...
Simulate a Drop Down box (not a Combo Box) as seen on Web Pages (Access 2007 and higher)
Make Controls resize with a form (Access 2007 and higher)
Switch Windows (Access 2007 and higher)
Check box is your trigger...
Why is that pink? Can I remove it?