473,473 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to have two subforms on one main form reference same table??

I have a main form with 2 subforms, each subform references different
data in the same table.

How do I make sure each subform only creates NEW records in the
referenced table and do not overwrite or change data in previously
created rows??

Otherwise I have to use two different tables, with similar kinds of
data, for each subform, which may well be the way to go even though
it's not really normalized, to make the data entry easier and simpler
for the end user.

Any code or MDB examples or website references would be very helpful,
thank you!

Thank you, Tom

Feb 16 '06 #1
2 4014
I think I got it...I changed the underlying query of each subform to
retrieve only the kinds of records I want for each subform.

If this is an incorrect way (so far in initial testing it works) or
there is a better way, please advise.

Thank you, I really appreciate this newsgroup.

Thank you, Tom

Feb 16 '06 #2
from the information in your other thread (different subject, folks, he
didn't multi-post), i'm assuming that you're using different subforms based
on the type of audit because a few fields in the table are specific to the
audit type. correct?

from a form data entry standpoint, the issue is: does your user need to
*see* both subforms *at the same time*? if not, suggest you use one subform
control in the main form, and set the control's SourceObject property to the
subform you need "on the fly", by running code on some event of some control
that designates which type of audit the user needs to enter data for -
AfterUpdate event, Click event, whatever. i can't remember offhand if you'll
need to also set the LinkChildFields and LinkMasterFields properties also;
if so, just include that in the code immediately after the SourceObject
setting - and it's the easiest part, because you're using the same table in
both subforms, so the Link property settings will be identical.

hth
"tlyczko" <tl*****@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
I think I got it...I changed the underlying query of each subform to
retrieve only the kinds of records I want for each subform.

If this is an incorrect way (so far in initial testing it works) or
there is a better way, please advise.

Thank you, I really appreciate this newsgroup.

Thank you, Tom

Feb 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Andante.in.Blue | last post by:
Hello, I have just inherited a very undocumented legacy database, developed in and still running on Access 97. The file is an MDB file, with no security. It is placed in a shared directory on a...
1
by: Alan Bloom | last post by:
I'm designing a db which stores client details but each client has multiple 'occasions'. For each occasion there is a section which has items purchased (there are sometimes none, sometimes...
8
by: Erik Thijs | last post by:
Hi, Currently I'm developing an Access app, but I'm running into a problem. Our database contains a lot of tables with the same format: |=====| |=====| |=====| |tbl1 | |tbl2 | |tbl3 |...
9
by: Zeeshan Iqbal via AccessMonster.com | last post by:
hi, im trying to design a form with two subforms. subforms no.1 (orders) is connected to the main form by customer ID and i dont know how i can connect another subform (order details)to the first...
5
by: Richard Stanton | last post by:
Hello all My database has a main form linked to table1. It has several subforms on the main form, all linked to table2. Table1 and Table2 are linked by primary/foreign key, no duplicates...
4
by: Dale Walker | last post by:
I've got a form that currently has a list box used to "find a record on my form" but the list in it is far too long and consists of fields of repeating data. Is there a way of creating a subform...
3
by: tlyczko | last post by:
I have a main form with 2 subforms, each subform references different data in the same table. How do I make sure each subform only creates NEW records in the referenced table and do not...
1
by: Ronniesss1 | last post by:
I have a table called RescheduleIns and another called Shop Complete Table that are opened together on another form called fAll Shop Orders. On this form, all the Shop Complete Table data is...
0
by: sparks | last post by:
I was using this to swap out a form with subforms on it by just making a copy and tying each to copy of the same table. subformV1 tblVisit1 subformV2 tblVisit2 etc Select Case TabCtl0.Value...
3
by: Rob | last post by:
I am putting together a small Access 2003 DB to record details of our motorvehicles. (this is more to teach myself some basics with Access) The main form is holding data that is common to most...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.