Sub Forms and list boxes

  • Thread starter Thread starter John Contact
  • Start date Start date
J

John Contact

Hi all,

Long time reader, first time poster. I am wondering if it
is possible to load a paticular subform based on a
selection from a combo / list box.

What have is a main form with multiple pages, what I want
to acheive is as a result of a selection on the first page
a subform is displayed based on that selection (if that
makes sense).

I am using access 97, as a temp solution, to mark call
centre reps against certain criteria according to the call
type. I have a main marking form with standard criteria
then a number of subforms containing the call sepcific
criteria. So what I want to happen is the marker to select
the call type and based on that selection the relevant
subform is displayed on the second page of the tab control.
Any ideas?

Many thanks, this is a very useful and worthful forum,


John
 
Use the AfterUpdate event of the listbox to set the SourceObject property of
the subform control.

SourceObject is a string, containing the name of the form to display in the
subform control. When you set the SourceObject, Access will have a guess at
what you want for the LinkMasterFields and LinkChildFieldds, so you
generally need to set those properties as well.

BTW, good to see you active now. :-)
 
Cheers Allen,

-----Original Message-----
Use the AfterUpdate event of the listbox to set the SourceObject property of
the subform control.

SourceObject is a string, containing the name of the form to display in the
subform control. When you set the SourceObject, Access will have a guess at
what you want for the LinkMasterFields and LinkChildFieldds, so you
generally need to set those properties as well.

BTW, good to see you active now. :-)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.




.
 
Back
Top