ShowAllRecords not working

G

Guest

I link the 1st form with 2nd form using Master/Child without open a new form
window, I put all the forms in Tab Control, that works fine. I also have a
button in the 2nd form that intends to show all records in the 2nd form,
DoCmd.ShowAllRecords. However it seems not functioning, the 2nd form still
shows one record linked from the 1st form. Any advise?
If my approach is wrong, do you have any suggestions?

Thanks in advance
Sheridan
 
G

Guest

With your subform linked to the master form via the Master/Child properties,
you will always only see records in the sub form that are linked to the
record in the master form. That is the purpose of the Master/child
relationship of the two forms.

--
HTH

Mr B
email if needed to:
draccess at askdoctoraccess dot com
 
S

SusanV

You can set the subform to show all records without the "filtering"
relationship between master and child forms via code similar to the
following:

Me.Parent.subformName.LinkChildFields = ""
Me.Parent.subformName.LinkMasterFields = ""

Or change it to another field like so:

Me.Parent.subformName.LinkChildFields = "FieldName"
Me.Parent.subformName.LinkMasterFields = "FieldName"

I use this fairly frequently in the After Update event of an Option group,
in a Select Case statement.
 
S

SusanV

Glad to help - always nice to know I could save someone the headbanging I
had to do the first time

;-D
 

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

Similar Threads


Top