Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jun 2003
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Continous Form Issue (Access 2000)

    Right now I have a continous form that when you click the button cmdhide it only shows items in the list where the quantity is > 0
    I now want to make another button in which it only shows "Main" or "Service" Materials, M=main S=service

    i tried it and this is what i did, i also have the cmdhide code here so u know what i mean

    'Displays only the materials selected on the continuous form
    Private Sub cmdHide_Click()
    Me.Filter = "Quantity > 0"
    Me.FilterOn = True
    End Sub

    Private Sub cmdmain_Click()
    Me.Filter = Main_Service = M
    Me.FilterOn = True

    End Sub

    When i did this i got errors, what am i doing wrong?-

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Continous Form Issue (Access 2000)

    The filter property requires a string, so your second bit of code should be something like this:

    <pre>Me.Filter = "Main_Service = 'M'"</pre>

    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Jun 2003
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Continous Form Issue (Access 2000)

    It does not recognize "Main/Service" which is the name of the textbox just like quantity is the name of the other box

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

    Re: Continous Form Issue (Access 2000)

    The filter is applied to the record source (table or query) of the form. You should use the name of the field in the table (or query), and if that name contains unusual characters such as a slash, you should enclose it in square brackets. If the field name is Main/Service, use<pre>Me.Filter = "[Main/Service] = 'M'"</pre>


  5. #5
    3 Star Lounger
    Join Date
    Jun 2003
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Continous Form Issue (Access 2000)

    thank you sir

Posting Permissions

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