A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

same subform used in two different forms



 
 
Thread Tools Display Modes
  #1  
Old March 2nd, 2010, 11:26 PM posted to microsoft.public.access.forms
Kathy R.[_3_]
external usenet poster
 
Posts: 25
Default same subform used in two different forms

Hi Folks,

Is it possible to use the same subform in two different main forms
simultaneously? If it's possible, is it good practice? I can foresee
that there may be problems with code, but the subform I'm thinking of is
very basic.

Three tables:

tblFamily
FamID (primary key)
FamLastName

tblIndividual
IndID (primary key)
InFamID
FirstName
MiddleName
....other personal data

tblAddress
AddressID
AdFamID
street
city
state
zip

Two main forms for different types of data entry

frmFamily with family information on the main form and address
information in the subform (sfrAddress) (also has sfrIndividual to enter
basic Individual information).

frmIndividual with detailed Individual information on the main form and
the address information on a subform. The address information on this
form is really just for display purposes and not data entry, although I
don't think that it needs to be restricted as such.

It's possible that both frmFamily and frmIndividual will be open at the
same time. Can I and should I use the same sfrAddress?

Thanks for your help.

Kathy R.
  #2  
Old March 3rd, 2010, 12:15 AM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default same subform used in two different forms

Access is fine with running 2 instances of a form simultaneously. No
problem. Sometimes I even put multiple instances of a subform on the one
form.

There's no problem with code. Just use Me and it understands the right form.
Or you can use Forms!Form1!Sub1 and Forms!Form2!Sub1 -- Access will
understand. Even if you place multiple instances on the one form, they will
each have different names for the subform controls, so you can still refer
to them easily.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"Kathy R." wrote in message
...
Hi Folks,

Is it possible to use the same subform in two different main forms
simultaneously? If it's possible, is it good practice? I can foresee
that there may be problems with code, but the subform I'm thinking of is
very basic.

Three tables:

tblFamily
FamID (primary key)
FamLastName

tblIndividual
IndID (primary key)
InFamID
FirstName
MiddleName
...other personal data

tblAddress
AddressID
AdFamID
street
city
state
zip

Two main forms for different types of data entry

frmFamily with family information on the main form and address information
in the subform (sfrAddress) (also has sfrIndividual to enter basic
Individual information).

frmIndividual with detailed Individual information on the main form and
the address information on a subform. The address information on this
form is really just for display purposes and not data entry, although I
don't think that it needs to be restricted as such.

It's possible that both frmFamily and frmIndividual will be open at the
same time. Can I and should I use the same sfrAddress?

Thanks for your help.

Kathy R.


  #3  
Old March 3rd, 2010, 01:21 AM posted to microsoft.public.access.forms
Kathy R.[_3_]
external usenet poster
 
Posts: 25
Default same subform used in two different forms

Thank you Allen!

Kathy R.

Allen Browne wrote:
Access is fine with running 2 instances of a form simultaneously. No
problem. Sometimes I even put multiple instances of a subform on the one
form.

There's no problem with code. Just use Me and it understands the right
form. Or you can use Forms!Form1!Sub1 and Forms!Form2!Sub1 -- Access
will understand. Even if you place multiple instances on the one form,
they will each have different names for the subform controls, so you can
still refer to them easily.

 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:42 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.