Open subform in a new window

kevers

Registered User.
Local time
Tomorrow, 02:32
Joined
Aug 13, 2012
Messages
18
Hi,

I have browsed around and I have seen this question pop up quite often, but I can't seem to find a working solution for me.

I would like to have a button that opens a subform in a new window, while keeping all the child/master relations.

I have seen this example from one of the entries on this forum, giving an idea of what I'm looking for.

Really appreciate your help.
 

Attachments

I use this and it works ---

Private Sub cmdOpenScores_Click()
On Error GoTo Err_cmdOpenScores_Click

DoCmd.OpenForm "frmScores", , , "[contactID]=" & Me.txtcontactID, , , Me.txtcontactID
Exit_cmdOpenScores_Click:
Exit Sub
Err_cmdOpenScores_Click:
MsgBox Err.Description
Resume Exit_cmdOpenScores_Click

End Sub

frmScores is the form I wish to open
contactID is the FK on my Scores form
Me.txtcontactID is the field on my contact form in which the button is placed.

Remember, i think you will need a sound relational set up for this to work.
 
I'm not getting it to work, when I run the command, it just prompts me to input information, which is probably not right.

- Did you create a macro or module, or did you just input the code in the "on click" property?

- I don't understand what you mean by:

"Me.txtcontactID is the field on my contact form in which the button is placed."

My button is just placed on the form, it is not in any field. (Just to be sure, by field, I mean a textbox or combobox, or anything like that).

Thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom