Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    United Kingdom

    Unanswered: Grabbing data from Main form to put in Sub form

    Hey guys,

    Can anyone help with this problem? I have main form with basic data like "date" and "data entered by" and a subform with more detailed stuff.

    What I want to do is have the date field in the subform grab the value form the date field in the main form.

    I've put the code in the AfterUpdate event of the first field that needs to be filled in on the subform. It looks wrong and does not work. Any ideas?

    The main form is called "frmCardiology_MAIN" and the field is called 'cboMonthOf'

    The sub form is called "frmCardiology_SUB" and the field I need the value to go into is called 'MonthOf'.

    Private Sub Trial_Name_AfterUpdate()
    Me.MonthOf.Value = frmCardiology_MAIN!cboMonthOf.Value



  2. #2
    Join Date
    Jun 2004
    Nottinghamshire, UK

    Rather than attempting to populate two tables with identicle information, you may be better off looking at the designs of the tables and normalizing these correctly to begin with.

    Why are you needing to duplicate the information that is stored?

    Perhaps it would be an idea to post the design of the tables that you are working with and we can see what the issue is.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts