Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Apr 2003
    Location
    Burnley, Lancashire, England
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    requery a combo within a subform in a tabbed form (2000)

    I have a database with a main form named "SUBS", a tab control named "TabCtl46" and a subform "SUBS_INVENTORY"

    problem - if i Dclick on a combobox "combo18" it opens Supplier Form, how do reference the combobox so i can requery it before going back to the form so the data i changed in the supplier form is automatically updated.

    e.g. code to reference a text box on the main form would be
    Forms!subs.Form!ControlName = testvalue

    but where do i add the code for the tabbed control and then the subform, have tried just referencing the subform and it doesn't work

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: requery a combo within a subform in a tabbed form (2000)

    You must *not* include tab controls when referring to a control, but you *do* need to include the subform if the control is on the subform. If Combo18 is on the subform Subs_Inventory on the form Subs, you can use

    Forms!Subs!Subs_Inventory.Form!Combo18

    Note: you must use the name of the subform as a control on the main form - click on the subform within the main form in design view; the Controls dropdown list in the toolbar and the Properties window will show this name. The control name is not necessarily the same as the name of the subform in the database window.

    See Forms: Refer to Form and Subform properties and controls on the Access Web for a comprehensive overview of referring to forms, subforms and controls.

  3. #3
    New Lounger
    Join Date
    Apr 2003
    Location
    Burnley, Lancashire, England
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: requery a combo within a subform in a tabbed form (2000)

    spot on answer - and only took the time it take to make a brew - amazing

    thanks again HansV

Posting Permissions

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