Bound SubForm within an Unbound Form?

W

WSF

Access97

I'm stumped.
I have an unbound main form.
This form is populated via a list box [OnExit] from a table, the key field
being a part number.
This provides read-only information on the part number.

I need to be able to show order history of that part number, that data
coming from a query on another table.
The reference in that query is the part number selected on the main form.

I am trying to display it as a bound subform (continuous) in the main form.
But it seems you cannot link a bound subform to an unbound main form?

The only way I can get the subform to display any data is when the main form
opens.
But I need it to change the displayed data dynamically to reflect the part
number chosen in the main form list box - [OnExit].

Am I missing something here?

TIA

WSF
 
T

tina

you could try this:

set the subform RecordSource to a query with a criteria on
the PartNumber field, as

Forms!frmName!ListBoxName

then set the list box OnExit or (i usually prefer)
AfterUpdate event to a procedure that runs the following

Me!subformControlName.Requery
 
J

John Smith

You can link with an unbound main form, but you have to type the links in
manually - the wizard won't do it. Put the main form field name in 'Link
Master fields' and the appropriate column from the sub-form record source in
'Link Child fields'. The sub-form should then update when the field value
changes.
 
W

WSF

Thanks John
Works fine.

WSF

John Smith said:
You can link with an unbound main form, but you have to type the links in
manually - the wizard won't do it. Put the main form field name in 'Link
Master fields' and the appropriate column from the sub-form record source in
'Link Child fields'. The sub-form should then update when the field value
changes.

--
HTH
John

WSF said:
Access97

I'm stumped.
I have an unbound main form.
This form is populated via a list box [OnExit] from a table, the key field
being a part number.
This provides read-only information on the part number.
I need to be able to show order history of that part number, that data
coming from a query on another table.
The reference in that query is the part number selected on the main form.
I am trying to display it as a bound subform (continuous) in the main form.
But it seems you cannot link a bound subform to an unbound main form?
The only way I can get the subform to display any data is when the main form
opens.
But I need it to change the displayed data dynamically to reflect the part
number chosen in the main form list box - [OnExit].
Am I missing something here?
 

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