Subform not part of form?

P

Pyrite

Is it possible to create a subform that does not appear at all on the main
form? I want to be able to record identification detials against personal
records (the reason I would like it to run as subform using Peron ID as the
link) but i dont want the subform to be open/visible unless a control button
is clicked. Basically if ID needs to be recorded the button is pressed and
the subform opens and details recorded as necessary which then auto populate
the relevant Person ID field based on the record currently being viewed in
the main form.
 
D

Douglas J. Steele

Sure. Just set the Visible property of the subform control on the parent
form. Just make sure it doesn't have focus when you're trying to do so.
 
P

Pyrite

Thanks thats brilliant. It has, however, created me a new problem (as seems
to always be the case :) ). I told the subform to look to the Person ID in
the parent form to match records etc so that the ID types are recorded
against that person. I would also like it to carry accross the 'Documents
Mailed' field so that I know which documents the ID relates to. I have tried
to simply alter the Child/Master Fields and add a second set so that it has
Person ID to Person ID and also Documents Mailed to Doucments Mailed. This
stops either from working though. The Person ID works fine and is transferred
accross no problem when set up on its own.
 
P

Pyrite

Sorry, I have managed to solve the previous problem and it now carries
accross both fields, I do however, have another. The info is being displayed
when I view the subform on the parent form (if I make it visible) but it is
not displayed when I open up the subform on its own from the form menu,
meaning I cant open it from a command button for the info to be displayed at
the min.
 
D

Douglas J. Steele

Not sure I understand.

There should be no differences beteween the subform being visible or not
visible.
 
P

Pyrite

This is what I thought. Basically I am at a point now where all the fields
transfer properly. That is no longer an issue. The problem now is as follows.
For ease I have made the subform visible, when I cycle through the records on
the parent form the subform cycles through its records accordingly. When I
click my command button to open the subform in a new window it always
displays the first record, i can cycle through using nav buttons to the
record i want but i would rather it just opened on the correct record. I am
looking at a screen where the subform on parent window displays current
record details and the same subform in new window displays first record
details. It does this even when they are open simultaneously so in essence
the same subform is displayiong diff records.

Code for button as follows:

DoCmd.OpenForm "SubFormName"
 

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