Access Subform Datasheet Only Returning 1 Result

后端 未结 1 379
长发绾君心
长发绾君心 2021-01-28 21:20

I know this question has been asked multiple times in some form or fashion, but I\'m not been able to find a solution that works and it\'s driving me crazy. I\'m creating a sear

相关标签:
1条回答
  • 2021-01-28 22:08

    Your main form should be unbound. Create a search query and set it as the subform's recordsource. You can pass the main form's fields as parameters to the query, for example:

    PARAMETERS [Forms]![YourMainForm]![YourTextField] Text (255);
    SELECT *
    FROM YourTableName
    WHERE ((([FieldName)=[Forms]![YourMainForm]![YourTextField]));
    

    The only thing you have to do when running a search is to .Requery the subform.

    Me.SubformName.Form.Requery
    
    0 讨论(0)
提交回复
热议问题