Subform problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Chinde
    New Member
    • Feb 2009
    • 52

    #1

    Subform problems

    Hi

    I have a main form with a sub form on. I would like for the users to navigate the records on the main form and when the data changes in the main form the sub form will fire an event. I have tried the OnCurrent event for the sub form but this doesn't seem to work.

    Could someone give me a little direction, I might just be thinking of this from the wrong direction??

    Using Access 2007
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Oppositely the same - Detecting a Sub-Form event from the Main Form?

    Comment

    • Chinde
      New Member
      • Feb 2009
      • 52

      #3
      Excellent, not got it going just yet but it looks just like what I need.

      Thanks again.

      Comment

      • Chinde
        New Member
        • Feb 2009
        • 52

        #4
        Here's what I ended up with for any future wanders.
        Code:
        Private WithEvents frmMainform As Access.Form
        
        Private Sub Form_Load()
        
            Set frmMainform = Forms("frmMain")
            frmMainform.OnCurrent = "[Event Procedure]"
        
        End Sub
        
        Private Sub frmMainform_Current()
            'Do Stuff
        End Sub
        Placed this on the sub form with the frmMainForm pointing towards the main form and the rest was history.

        Works a treat!!

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32669

          #5
          Thanks for the update Chinde :)

          Comment

          Working...