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 / Forms Programming / March 2007

Tip: Looking for answers? Try searching our database.

Create new record in different table?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LauriS - 28 Mar 2007 00:16 GMT
I have a table called Referrals.  I need to add a button to that form to
allow users to add records to table called Deferred.  Records in the Deferred
table must have a record in a table called Donors.  My problem is when that
relationship does not exist yet.

I figured out how to check to see if there's a matching record in the Donor
table but what I can't figure out is how to create the record if it's not
there.  I need to create a new record in the Donors table and fill in one
field.  The problem is that the Donors table is not open at this point - the
form the user is in is based on the Referrals table.  Is there a way to
create a record in a table that isn't open?
Carl Rapson - 28 Mar 2007 16:17 GMT
Sure, use something like this:

DoCmd.RunSQL "INSERT INTO [Donors] ([field]) VALUES ('value');"

Carl Rapson

>I have a table called Referrals.  I need to add a button to that form to
> allow users to add records to table called Deferred.  Records in the
[quoted text clipped - 11 lines]
> form the user is in is based on the Referrals table.  Is there a way to
> create a record in a table that isn't open?
 
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.