Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 16th, 2006, 03: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, 06:15 PM
Jeremy Wallace
Guest
 
Posts: n/a
Default Re: How to have two subforms on one main form reference same table??

Tom,

Yeah, if you get into edits, you'll get into write conflicts, and that
will be a headache.

Every form has a set of properties that controls what data is seen and
how it can be maniputlated. On the Data tab of the form's property
sheet, check out
Allow Filters,
Allow Edits,
Allow Deletions,
Allow Additions, and the less obvious
Data Entry, which will make your form _not_ show existing records, only
showing new ones you've added that session.

Jeremy
--
Jeremy Wallace
Fund for the City of New York
http://metrix.fcny.org

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

Hello everyone, one subform just shows one single field that is
auto-updated in the AfterUpdate event of one control on the main form,
this is just for user feedback, and the second subform is for adding
records to the table that the end user has to decide what to put in.

The two subforms are *diffferent* and expose different table data
relevant to their particular purpose, therefore changing the source
object on the fly won't work...

I solved the problem by setting up the underlying query of each subform
to show only the records matching the relevant criteria (is is a
program or record audit??)...

My initial testing shows that it works, I probably could do the same
thing with a different filter in each subform.

Thank you, Tom

P.S. Metrix looks nice from what little I saw of it, I will recommend
it for evaluation if the subject ever comes up here at work.

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

> The two subforms are *diffferent* and expose different table data[color=blue]
> relevant to their particular purpose, therefore changing the source
> object on the fly won't work...[/color]

i'm glad you got a solution working that suits you, Tom. just as a fyi,
there's no reason why changing the source object of the subform control on
the fly wouldn't work - unless the user needs to see both subforms *at the
same time*. note here that we're talking about the SourceObject property of
the subform control, NOT the RecordSource property of a subform. you can
change the SourceObject property easily whether the actual subforms are the
same, similar, or completely different, and whether or not each subform is
bound to the same table or to completely different tables.

hth


"tlyczko" <tlyczko@gmail.com> wrote in message
news:1140118120.629830.112870@g14g2000cwa.googlegr oups.com...[color=blue]
> Hello everyone, one subform just shows one single field that is
> auto-updated in the AfterUpdate event of one control on the main form,
> this is just for user feedback, and the second subform is for adding
> records to the table that the end user has to decide what to put in.
>
> The two subforms are *diffferent* and expose different table data
> relevant to their particular purpose, therefore changing the source
> object on the fly won't work...
>
> I solved the problem by setting up the underlying query of each subform
> to show only the records matching the relevant criteria (is is a
> program or record audit??)...
>
> My initial testing shows that it works, I probably could do the same
> thing with a different filter in each subform.
>
> Thank you, Tom
>
> P.S. Metrix looks nice from what little I saw of it, I will recommend
> it for evaluation if the subject ever comes up here at work.
>[/color]


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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