Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2014
    Posts
    22
    Provided Answers: 1

    Unanswered: Form combo box choice shows record on subform

    I know there is a simple solution to this, but I need your help. I have a form (frmSystems) with a combo box (cmbSearchbyShortName) with "Product Short Name" as the choice. When the user chooses a Product Short Name, the record is revealed in the subform (frmSystemsforSub). I know the code is probably simple but, I can't figure it out for anything. Your advice is needed, and suggestion on whether to have the command run OnUpdate, OnChange or what.

  2. #2
    Join Date
    Mar 2015
    Posts
    27
    Quote Originally Posted by bscottj48 View Post
    I know there is a simple solution to this, but I need your help. I have a form (frmSystems) with a combo box (cmbSearchbyShortName) with "Product Short Name" as the choice. When the user chooses a Product Short Name, the record is revealed in the subform (frmSystemsforSub). I know the code is probably simple but, I can't figure it out for anything. Your advice is needed, and suggestion on whether to have the command run OnUpdate, OnChange or what.

    Update your subforms recordsource in the After_Update event of the cmbSearchbyShortName combo box.

    In the event, get your selected data from the cmbSearchbyShortName combo box and use it in the where clause of a Select statement in your recordsource string.

    The way to reference the record source of your frmSystemsforSub subform from the After_Update event which is on the frmSystems form is going to be like this....

    Me!SubForm1.Form.RecordSource = ... where SubForm1 is the name of the subform CONTROL to on frmSystems to which you have assigned frmSystemsforSub as the control source, not the name of the subform itself (unless you gave the control the same name)
    Last edited by rodrich1954; 03-25-15 at 14:14.

Posting Permissions

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