Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

how to make cbo value repopulate a subform

Discussion in 'Information Technology' started by James, Jul 28, 2006.

  1. James

    James
    Expand Collapse
    Guest

    I've got a combo box, cmd button, and subform. The subform
    automatically lists all records available. I want to use to combo box
    to select a certain user id, then use the cmd button to generate a sql
    statement : "SELECT * FROM audit_table WHERE [ModifiedBy] = '" &
    Me!cboModifiedBy & "'"

    I want the results of that sql statement to appear in the subForm...
    and ideas??? Thanks.
     
  2. Loading...

    Similar Threads Forum Date
    Sikh Values Blogs Oct 21, 2015
    Jainism Jainism and Sikhism: The Value of Being “Footnote” Traditions Interfaith Dialogues Jul 13, 2015
    World Why do we value gold? Breaking News Dec 9, 2013
    Canada Quebec's Charter of Values: If You Have A Personal Story, Please Share It Here! Breaking News Sep 19, 2013
    Canada Thousands March through Montreal to Protest Quebec Charter of Values (& Video) Breaking News Sep 16, 2013

  3. Svetlana

    Svetlana
    Expand Collapse
    Guest

    Try on click event of your button to apply the filter you want as like
    Forms!NameOfMainForm!NameOfSubForm.Filter="ModifiedBy=" &
    Forms!NameOfMainForm!cboModifiedBy
    Forms!NameOfMainForm!NameOfSubForm.FilterOn=True
    (I suppose that in subform you have a control that keeps the value of
    the combobox in the mainform.)
    Alternative instead of a command button you could use a toggle button
    for every time you want to see all the records together again to turn
    the FilterOn=False.
     
  4. James

    James
    Expand Collapse
    Guest

    I keep getting Error 438: Object doesn't support this property of
    method.
    I have the subform as a form that is called in (does that make since?)
    So the subform shows up under my list of forms.... The subform box on
    my "AuditTrail" form is called "AuditTrailSubform" and the source
    object of that box is "AuditTrailSubform" ...

    The form AuditTrailSubform is in datasheet view.... maybe i'm just
    going about this wrong... the source for that form is a query statement
    from a table: "Audit_Table"... I'm rather inexperienced, if you can't
    tell, so i'm sorry if this doesn't make since, just send me a msg back
    and i'll try my best to explain more. Thanks.
     

Share This Page