473,766 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
+ 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 4046
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 LinkMasterField s 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******** *************@g 44g2000cwa.goog legroups.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
4320
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 dedicated server, but it is usually accessed only by 1 user; the development copy I use is not accessed by anyone else). I am going through the database and fixing logic errors and attempting to optimize the efficiency of the code. I am finding...
1
2461
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 several). But the main difficulity I'm having is when I try to do stock control stuff to keep track of how many of each individual item has been sold. The basis I've got so far is a client table an occasion table, which is linked to the client ID,...
8
7077
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 | |-----| |-----| |-----| etc |name1| |name2| |name3| |descr| |descr| |descr|
9
9535
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 subform(orders), so that when i enter a customer id i get the orders related to that customer in subform no.1 and order details related to that order in subform no.2. please message me if some one knows how to do that ...
5
2637
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 allowed, one-to-one. If I update field(s) on a single subform it works fine but when I update fields on multiple subforms ie without closing the form between updates, I get the following error:
4
4508
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 to do the same job that is in datasheet view with a collapsible subdatasheet? The main form is based on a table consisting of dates, events and venues (plus a lot of other guff not needed to explain this little problem). Each record has an ID,...
3
518
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 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...
1
1578
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 displayed as the main form and the RescheduleIns data is displayed as a subform. I would like to open another form called fPurchasing that opens fAll Shop Orders, but filterd based on records that have subforms. I have the following code that loads...
0
1386
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 Case 0: 'Initial Visit Child6.SourceObject = "subformV1"
3
2076
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 vehicles. Eg. Registration date, expiry, VIN/Chassis, Make, Model, Year. Additional things that I will record is maintenance/servicing, insurance etc etc. The vehicles are a bit varied,: Cars, truck, trailer, motorbikes, caravan.
0
9404
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8833
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
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 we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.