Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / March 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NetworkTrade - 14 Mar 2007 18:14 GMT
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..

Signature

NTC

Marshall Barton - 14 Mar 2007 20:16 GMT
>am trying to clarify the subform 's status....
>
[quoted text clipped - 8 lines]
>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

Signature

Marsh
MVP [MS Access]

NetworkTrade - 19 Mar 2007 01:55 GMT
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.....
Signature

NTC

> >am trying to clarify the subform 's status....
> >
[quoted text clipped - 17 lines]
>     Me.subform.SetFocus
>     DoCmd.RunCommand acCmdRecordsGoToNew
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.