Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    660

    Unanswered: get data from subform

    I want to show the data in the subform to another form. How to retrieve it? For example, i have country combo box in the subform. when user select one country, i want to show the value in the form. Thanks.

  2. #2
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Are the two forms connected?
    Ryan
    My Blog

  3. #3
    Join Date
    Mar 2004
    Posts
    660
    Yes,there is button called make receipt in the first form, then it will pop up another new form. I would like to retrieve the country value from subform in the first form to the new form. Thanks.

  4. #4
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    In the AfterUpdate() event of the subform, open the new form passing the value of the combobox as an OpenArgs argument, such as

    Code:
    DoCmd.OpenForm "NewFormNameHere", , , , , , Me.ComboBoxNameHere.Value
    Of course, you can put any other parameters you need in there as well.

    In the NewForm's Open event, put the following code:

    Code:
    Me.ControlNameHere = Me.OpenArgs
    Hope this helps,

    Sam

Posting Permissions

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