Same object used two different places

J

JoeA2006

Is it safe to use the same object in two different places? For example can I
use the same subform to display the same records on two different main forms,
rather than creating a new subform with the same record source?
 
D

Duane Hookom

Yes. I can't think of any reason why you couldn't do this. I have placed 5
copies of the same subreport in the detail section of a main report with no
issues.
 
J

james_keegan

Duane said:
Yes. I can't think of any reason why you couldn't do this. I have placed 5
copies of the same subreport in the detail section of a main report with no
issues.


Yup. I'm just finishing up a form that calls the same subform five times
(once for each day of the week) and just changes the recordsource for the
subform through the VB code. Same subform though.

JK
 
D

Duane Hookom

Have you considered using the Link Master/Child rather than changing the
record source?
 
J

james_keegan via AccessMonster.com

Duane said:
Have you considered using the Link Master/Child rather than changing the
record source?
[quoted text clipped - 6 lines]

Yeah, but the main form isn't bound to anything, it's just there to hold the
subforms for the different days of the week. (I said report instead of form,
OMG!)

I'm sure what I've done is neither efficient nor elegant, but it works!

JK
 
D

Duane Hookom

You can use link master/child with a main form that isn't bound. You can use
a text box as the Link Master.


--
Duane Hookom
MS Access MVP

james_keegan via AccessMonster.com said:
Duane said:
Have you considered using the Link Master/Child rather than changing the
record source?
Yes. I can't think of any reason why you couldn't do this. I have placed
5
copies of the same subreport in the detail section of a main report with
[quoted text clipped - 6 lines]

Yeah, but the main form isn't bound to anything, it's just there to hold
the
subforms for the different days of the week. (I said report instead of
form,
OMG!)

I'm sure what I've done is neither efficient nor elegant, but it works!

JK
 
J

james_keegan via AccessMonster.com

Duane said:
You can use link master/child with a main form that isn't bound. You can use
a text box as the Link Master.
[quoted text clipped - 15 lines]

Huh. I'll try it again, but I could have sworn when I first tried that it
told me I couldn't create a master/child link with an unbound control.

Thanks for the tip.

JK
 
R

Rick Brandt

james_keegan via AccessMonster.com said:
Duane said:
You can use link master/child with a main form that isn't bound. You
can use a text box as the Link Master.
Have you considered using the Link Master/Child rather than
changing the record source?
[quoted text clipped - 15 lines]

Huh. I'll try it again, but I could have sworn when I first tried
that it told me I couldn't create a master/child link with an unbound
control.

You can't use the popup dialog tool to indicate the linking fields when
either form is unbound. You CAN however just type the proper entries into
the MasterLink and ChiuldLink property boxes and they will work if the
MasterLink is just the name of a Textbox on an unbound parent form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top