By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,968 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,968 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.