473,396 Members | 1,864 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,396 software developers and data experts.

Storing selected fields to two tables

2
I have two databases (DB 1 and DB 2) that linked together by a particular table. So database 1 could see a table in DB 2. Table1 belongs to DB1. Table2 belongs to DB2 but link to DB1.

- On this DB 1, we have a form that takes user input. The form ties to table1. Is there a procedure or method to automatically copies selected fields (not record) to the linked Table2? Ex: A form has 5 fields. I want to copy field 2 and 4 as soon as the information inserted into the table1. The fields are optional. So if no info entered, then null value is inserted to linked table2. I only want to copy the latest record that just entered. All information on that record will be entered into table1. To summarize what I want to do: selected fields on new record are stored into both tables at the same time. Table1 contains field1-5, table2 contains field2&4 after new record is entered.

I am wondering if this could be done with expression or VBA is needed. If so, is there an example that someone already put together.

Thanks,

LP
Oct 1 '07 #1
2 1425
DSnail
1
LP, I don't know if this is appropriate on this site, but I would like some clarification:

1. By the nature of linked tables, are the necessary tables available in one database?

2. Is the form in question only for adding new records, or can it edit existing records?

Typically, I would use an update or append query to accomplish this...may not be the most efficient approach, but works well for me. If you could give me some insight, I would be happy to show you the code needed to accomplish your goal.

-=DS=-
Oct 1 '07 #2
laph
2
Hi DSnail,

1. Yes, the linked table shows up on DB1.
2. the form on DB1 can add new or edit current record.

As far as update or append, does it only append the lastest record with only selected fields that is being entered or just entered.

I am thinking about writing VBA code that runs after update. VBA will check to see if the is empty. If so then just ignore or add a null value. VBA will need to check current or latest record and copy the values to the link table. Do you have the code that does it? I am new to VBA.

Thanks,

LP


LP, I don't know if this is appropriate on this site, but I would like some clarification:

1. By the nature of linked tables, are the necessary tables available in one database?

2. Is the form in question only for adding new records, or can it edit existing records?

Typically, I would use an update or append query to accomplish this...may not be the most efficient approach, but works well for me. If you could give me some insight, I would be happy to show you the code needed to accomplish your goal.

-=DS=-
Oct 2 '07 #3

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

Similar topics

6
by: Shannan Casteel via AccessMonster.com | last post by:
I'll explain as well as possible...not an experienced user...but learning. I am working on a database for different kinds of problems with machines. A user will be able to select a problem...
14
by: John Welch | last post by:
Hi all. I'm creating a FE/BE database that will be used by about 6 users. As usual, I have several fields, such as "OrganizationTypeID" that will get values (via combo boxes in forms) from separate...
2
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs,...
4
by: ZaphodBBB | last post by:
Hi At the moment I do not need to know the how-to's, just interested if what I am thinking of trying to do is likely to be possible. 1. Is it possible to write code that would enable an Access...
3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
0
by: PCCTN | last post by:
OK I have a database set up with three tables but only two I need help with Invoices Customers The fields for both tables are the same Name - address City State Zip
10
by: drago | last post by:
Hello guys again! Back with invoice problems. Just want to know how to store data in the main database in different tables and fields using a form. I have a datasheet view of a form where i have to...
11
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night)...
1
by: Jeff | last post by:
Hey asp.net 2.0 at work we are about to start on a new project. Creating a website. My mananger has created the database. The database has a table holding user information (not that standard...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.