Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 16th, 2006, 02:15 PM
tlyczko
Guest
 
Posts: n/a
Default 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

  #2  
Old February 16th, 2006, 03:15 PM
tlyczko
Guest
 
Posts: n/a
Default Re: How to have two subforms on one main form reference same table??

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

  #3  
Old February 16th, 2006, 04:55 PM
tina
Guest
 
Posts: n/a
Default Re: How to have two subforms on one main form reference same table??

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" <tlyczko@gmail.com> wrote in message
news:1140102103.369802.14880@g44g2000cwa.googlegro ups.com...[color=blue]
> 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
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles