Subform filter

N

Nbene

Sub form Help needed.

I am trying to open a sub form based on a selection from the current
sub form.

The current sub form has a list of contacts (continuous form) Each
recordset has a button to open the contact particulars. However I
would like the frmContact to open in the same sub form as the list of
contacts, obvioulsy replacing the list of contacts.

I can open the form as a seperate window with the correct contact but
each time i change it to open in the sub form the filter gets lost and
it opens with the first contact in the list.

FrmContact recordsource is
SELECT tblContact.ContactId, tblContact.Title, tblContact.FirstName,
tblContact.Surname
FROM tblContact;

Below i have tried to set the form filter to be the contactid from
current form.

FrmName = "frmContact"
Link = "[ContactId]=" & Me.ContactId
Form_frmContact.Filter = Link
Form_frmMain.subfrmWindow.SourceObject = FrmName

Any ideas???

Thanks.

NBene
 

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