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 / July 2006

Tip: Looking for answers? Try searching our database.

Using unbound forms to update tables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mchicke - 21 May 2006 14:57 GMT
I am attempting to similate a already in-use generic outlook form in access.  
I would like to use 1 unbound form to save the data to several different
tables.  How should I go about this?
Ofer Cohen - 21 May 2006 20:49 GMT
Is it to update existing records or insert new records to the tables?

For new record you can use append SQL, and for update existing record use
update SQL.
I'll be happy to assist of you can provide more details on what you are
trying to do.

Signature

Good Luck
BS"D

> I am attempting to similate a already in-use generic outlook form in access.  
> I would like to use 1 unbound form to save the data to several different
> tables.  How should I go about this?
mchicke - 22 May 2006 01:08 GMT
It is part of a database that will have many purposes.  This is the first.  I
have created several tables for various data categories and an unbound form
with tab controls, and all unbound fields.  I want to have the code update
the unbound fields to the proper tables.  I also have a unbound text box for
the date, which would be used for the date field in each table.  Hope this
helps.

> Is it to update existing records or insert new records to the tables?
>
[quoted text clipped - 6 lines]
> > I would like to use 1 unbound form to save the data to several different
> > tables.  How should I go about this?
mchicke - 22 May 2006 01:07 GMT
I should be more clear.  I want to insert new records.  The date field will
be used in all tables, and there is a 'shift' field that will also be used in
all tables.  So there will be three records with the same date.  Is this
possible, or is it too complex?

> It is part of a database that will have many purposes.  This is the first.  I
> have created several tables for various data categories and an unbound form
[quoted text clipped - 13 lines]
> > > I would like to use 1 unbound form to save the data to several different
> > > tables.  How should I go about this?
Ofer Cohen - 22 May 2006 20:41 GMT
You can use this code to insert new record to a table

Dim MyDB As Dao.DataBase , MyRec As Dao.RecordSet
Set MyDB = CurrntDb
Set MyRec = MyDb.OpenRecordSet("Select * From TableName")
MyRec.AddNew
MyRec!FieldNameInTable = Me.[FieldNameInForm]
MyRec!Field2NameInTable = Me.[Field2NameInForm]
MyRec!Field3NameInTable = Me.[Field3NameInForm]
MyRec!Field4NameInTable = Me.[Field4NameInForm]
MyRec.Update

You can do the same to the rest of the tables
Signature

Good Luck
BS"D

> I should be more clear.  I want to insert new records.  The date field will
> be used in all tables, and there is a 'shift' field that will also be used in
[quoted text clipped - 18 lines]
> > > > I would like to use 1 unbound form to save the data to several different
> > > > tables.  How should I go about this?
SandraL - 06 Jul 2006 22:28 GMT
> You can use this code to insert new record to a table
>
[quoted text clipped - 32 lines]
> > > > > I would like to use 1 unbound form to save the data to several different
> > > > > tables.  How should I go about this?
 
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.