how to filter a subform from a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ivonsurf123
    New Member
    • Nov 2017
    • 27

    how to filter a subform from a form

    Hello,

    I have a question on how can I filter fields from Subform to a form, attached is the database I am working on, also does anybody know the format to use as numeric field in a query, like # for Date? Thank you.
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3653

    #2
    Ivon,

    Please refer the the guidelines on Asking Good Questions first.

    Second, we are typically not going to open a DB that has been freely posted on the forum. Please tell us exactly what it is that you are having problems with, describe what you have tried already (including the troublesome code you are using) and then we can better troubleshoot your problem.

    Thanks!

    Comment

    • ivonsurf123
      New Member
      • Nov 2017
      • 27

      #3
      I apologize did not know about the zip file.

      This is where I need help with: I have a question on how can I filter fields from Subform to a form in a query, also does anybody know the format to use as numeric field in a query, like # for Date? Please help. Thank you.

      ID is a numeric field that is in a Subform called subfrm_GCDS_Ope rations_Positio ns_Fills_Log_Ne w1,

      The main form is this query, Main form is called frm_CDS_Operati ons_Fills_Log_N ew

      Code:
      Me!subfrm_GCDS_Operations_Positions_Fills_Log_New1.Form.RecordSource = "SELECT tbl_GCDS_Operations_Positions_Fills_Log.* " & _
      "FROM tbl_GCDS_Operations_Positions_Fills_Log " & _
      "WHERE (((tbl_GCDS_Operations_Positions_Fills_Log.[ID])=' " & Me.cboDate.Column(0, Me.cboDate.ListIndex) & "'))" & _
      "ORDER BY tbl_GCDS_Operations_Positions_Fills_Log.[ID];"
      Me.Requery
      Last edited by ivonsurf123; Apr 19 '18, 09:28 PM. Reason: Removed attachment from prior post

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        Quotes (') and Double-Quotes (") - Where and When to use them may help. It also covers numerics - which actually don't even need delimiters.

        *Edit.
        I just checked and neither article explains how to include numeric literals in a SQL string. Never mind. They need no delimiters at all so it's fairly simple.
        Last edited by NeoPa; Apr 20 '18, 12:30 AM.

        Comment

        Working...