Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / March 2005

Tip: Looking for answers? Try searching our database.

NEW record, another table, using Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
phmckeever - 04 Mar 2005 18:39 GMT
I have developed a Books Inventory database containing three tables, Authors,
Publishers, and Books.  I have developed three Forms, one for each table.  
When I am entering records using the Books' form, is it possible to enter a
new record in Pulishers' table using this form?

Also, is the three forms option for the tables the easiest way to enter
records in them?

phm
Rick B - 04 Mar 2005 19:05 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.