subform open vs load vs etc & new record method....

G

Guest

am trying to clarify the subform 's status....

If I change the MainForm (already open) to another existing record - its
related subform will go to a related existing record. I can force the
subform to a new record by adding a button/button wizard...... but haven't
figured out the right way to avoid a button.

Not clear if the subform is opening/loading or what....when one changes
records of the MainForm

and am unclear as to what vb command would go at what event so that for any
MainForm change to always have the subform at the new record..
 
M

Marshall Barton

NetworkTrade said:
am trying to clarify the subform 's status....

If I change the MainForm (already open) to another existing record - its
related subform will go to a related existing record. I can force the
subform to a new record by adding a button/button wizard...... but haven't
figured out the right way to avoid a button.

Not clear if the subform is opening/loading or what....when one changes
records of the MainForm

and am unclear as to what vb command would go at what event so that for any
MainForm change to always have the subform at the new record..


I think you should be able to move your button's code to the
main form's Current event, but then I don't know what code
you are using or where your buttons are.

This sequence seems to work:

Me.subform.SetFocus
DoCmd.RunCommand acCmdRecordsGoToNew
 
G

Guest

a belated thank you - just got back to this little project....

in fact your specific advice did not work !! it threw an error something
along the lines of 'not available' to run that command....(I didn't note
specifically....)

replaced with this line:

DoCmd.GoToRecord , , acNewRec

having seen it working on the Command Button that correctly sent the subform
to a new record.....and this works fine....

But it was the event...i.e. OnCurrent that had me baffled as I was playing
around in Load and Open.... my various Access reference books don't offer
a simple list/explanation of all Form properties...

I wonder what the property 'AfterFinalRendition' does ..(or if is ever to be
used)...just for fun I searched it on this site and Access Help and did NOT
come back with any results...ah well will save that mystery for another
day....

thanks again.....
 

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