dbTalk Databases Forums  

multiple subforms

comp.database.ms-access comp.database.ms-access


Discuss multiple subforms in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sean
 
Posts: n/a

Default multiple subforms - 06-03-2004 , 09:47 AM






I have one main form which contain three subforms overflapping each
other. Depending on a data field (X) on the main form,
when X=1 then subform1.visible =TRUE while the others FALSE;
when X=2 then only subform2.visible =TRUE; and
when X=3 then only subform3.visible =TRUE.

Each subform has its own set of data to update. I could managed to
update one of the subforms, the other subforms could not be updated;
they simply just revert back those edited data.

Example, when X=1 subform1 could be updated and then I switch X to 2,
and subform2 appear (and data for subform1 were nicely updated). I
could edit its data, however when I switch X to 3, all those edited
data on subform2 was completely reverted. Any idea what went wrong ?
Or how do I force data update from subform2 ?

Thanks
sean

Reply With Quote
  #2  
Old   
Gary Floam
 
Posts: n/a

Default Re: multiple subforms - 06-03-2004 , 03:44 PM






Sean,

As the subforms are overlapping, you may be entering data into the wrong
form. You should set .Enabled = False when you set .Visible = False for
each form you don't want to see.

Hope this helps,

Gary


"sean" <sean (AT) kistem (DOT) po.my> wrote

Quote:
I have one main form which contain three subforms overflapping each
other. Depending on a data field (X) on the main form,
when X=1 then subform1.visible =TRUE while the others FALSE;
when X=2 then only subform2.visible =TRUE; and
when X=3 then only subform3.visible =TRUE.

Each subform has its own set of data to update. I could managed to
update one of the subforms, the other subforms could not be updated;
they simply just revert back those edited data.

Example, when X=1 subform1 could be updated and then I switch X to 2,
and subform2 appear (and data for subform1 were nicely updated). I
could edit its data, however when I switch X to 3, all those edited
data on subform2 was completely reverted. Any idea what went wrong ?
Or how do I force data update from subform2 ?

Thanks
sean



Reply With Quote
  #3  
Old   
sean
 
Posts: n/a

Default Re: multiple subforms - 06-03-2004 , 11:10 PM



Thanks Gary,

I always thought that .visible=false will assume .enabled =false too.
sean.


"Gary Floam" <floam (AT) comcast (DOT) net> wrote

Quote:
Sean,

As the subforms are overlapping, you may be entering data into the wrong
form. You should set .Enabled = False when you set .Visible = False for
each form you don't want to see.

Hope this helps,

Gary

Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.