Not using that form, but you could have a button that pops-up the
appropriate form.
If you are selecting the publisher from a drop-down list, there is also some
fancy coding you could do using the "not in list" event to have a form pop
up for you and allow you to add a publisher.
You might be able to use subforms to do all of this on one form, but I doubt
it. Personally I think the three forms option (with buttons to "add a
publisher" or "add an author" on your main form) is the best design from
what little you have described.
Good luck,
Rick B
> I have developed a Books Inventory database containing three tables, Authors,
> Publishers, and Books. I have developed three Forms, one for each table.
[quoted text clipped - 5 lines]
>
> phm
phmckeever - 04 Mar 2005 19:39 GMT
Hi Rick B,
Thank you for letting me know that 'three tablses and three forms is the
better way to go. And, the popup seems to be the way for adding new records.
However, what would be the code behind the button to "add a Publisher" or
"add an Author" from the Books form?
Thanks!
phm
> Not using that form, but you could have a button that pops-up the
> appropriate form.
[quoted text clipped - 23 lines]
> >
> > phm
Larry Daugherty - 05 Mar 2005 19:31 GMT
There is some code to get you started at
http://www.mvps.org/access/forms/frm0015.htm
You'll need versions of that code in the NotInList Event of the Publishers
and Authors comboboxes
in that code, just after rs.update, put in something like
DoCmd.OpenForm("frmAuthor"), ... ,acDialog
Look in Help for the OpenForm Method and read about it. Put in a comma for
each missing parameter. You want to open the form in Dialog mode so that
nothing else can go on in your application until the record has been
completed and you have closed the form.
You'll also want to be sure that you have set the Limit to List property
true in each combobox.
HTH

Signature
-Larry-
--
> Hi Rick B,
>
[quoted text clipped - 34 lines]
> > >
> > > phm