Same object used two different places

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
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
 
Have you considered using the Link Master/Child rather than changing the
record source?
 
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
 
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
 
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
 
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.
 
Back
Top