473,322 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Can I have one form save information to 2 tables?

283 100+
Hello everyone that is reading this,

What I want to do is have my form be able to save the information you type in to 2 seperate tables. I have one table we can call the MasterTable that will save everything that is typed in. The second Table we can call (SubTable) I only want to save parts of the information. Not everything like the MasterTable. I tried to set up a relationship linking parts of the two tables together but that does not seem to work. I know that it can be done just wondering how?

Thanks in advance
Mar 12 '10 #1
1 4310
NeoPa
32,556 Expert Mod 16PB
This is sort of possible, speaking generally, but I suspect that you would like the same data store to more than one field. IE. One in one table, and another in the other one. Let's talk some fundamentals for a second.
  1. If the RecordSource for a form is a query, and that query is formed of multiple tables linked together AND is updatable (See Reasons for a Query to be Non-Updatable), then that form can write to multiple tables concurrently.
  2. Each control on the form can be bound to only one field from your RecordSource. If you had a control [First Name] for instance, and this was required in both of your tables, it could not be bound to both.
  3. With a little VBA work and some imagination, you could create a bunch of other controls on your form, which may be invisible, and these could be made duplicates of the ones you can see. These could then be bound to your alternative table fields. I suggest the code could go in your control AfterUpdate event procedures, but I would consider using the form's BeforeUpdate procedure instead. That way all code need only be processed once, when you're sure it's required.
Mar 13 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ewin | last post by:
I'm a beginner user of MS Access, and I am having a problem building a database with a complex form that enters to several tables. I did not use subforms because I am attempting to emulate...
2
by: Tolu | last post by:
Hello I am trying to save information from one form to two tables. I have a table for Student info and Transcript line. I have a form that list all the classes (using text boxes) a student is...
1
by: waddley | last post by:
I have a client who wants to have Access ask to save changes anytime data is changed or added into the database. I'm not really an Access guy, I actually run their servers, but have been dropped...
0
by: elmo | last post by:
Hi, I have a transaction table that I need to update from a from. The form should be able to display information from different tables. I have a Learner table with Learner information. I also...
8
by: fonzie | last post by:
Is it possible to have a data entry form where the information is stored in several different tables (5 or 6)? I have an inventory database where Table1 stores all of the data common to all...
2
by: lovage86 | last post by:
Hi guys, Im trying to implement the following, but having trouble doing so. I have form that shows saved records of project details. with this form, i want to be able to add new project...
3
by: kcddoorman | last post by:
I'm making a shop order entry system. Basically I take a work order that a sales person writes and rewrite into a door builders language. I'm having trouble with the form's record source. I have...
13
by: BrokenMachine | last post by:
Hi there, I'm using Access 2003 and Word 2003 and I'm trying to import data from the word form to multiple access tables in a one to many relationship, but I can't seem to figure it out. I have...
1
by: Arli | last post by:
I have the following linked tables: tblMainPL is my main table that I need to pull the information in from. It has the following fields: Autonumber1 -PK set as autonumber Date - short date...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.