Results 1 to 3 of 3
  1. #1
    Kirsti is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    172

    Form in Datasheet View to filter table data

    Hi,

    I have a new problem!

    I have one table in my DB. I have a group of users who require a 'spreadsheet-like' view of the data, and will also be inputting data. So, I have created a form (datasheet view). However, the users only need to see a subset of the data in the table. The criteria is really simple, i.e. Field_1 = False And Field_2 = False And Field_3 = "xxx".

    I've tried putting this criteria into the 'Filter' field in the Data tab of the properties box in the form, but the filter isn't applied. I've tried writing a private sub in vba (Me.Filter = (Field_1 = False And Field_2 = False And Field_3 = "xxx") Me.FilterOn = True, and still the filter isn't being applied.



    Can someone please point out where I am going wrong?

    I can easily create a maketable query and link the form to the new table, but that is replicating data in the database and something I am trying to avoid - it seems as though it should be simple to do it within the form.

    Thanks,
    Kirsti

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Put the filter string within quotes in either the property or code.

    "Field_1 = False And Field_2 = False And Field_3 = 'xxx'"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Kirsti is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    172
    Thanks June - I actually ended up using the query builder within the Record Source in the Form properties, and got it working that way. Looks like your solution would have been quicker though!

    Thanks again,
    Kirsti

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Datasheet view of Split Form in a Tab??
    By tylerg11 in forum Forms
    Replies: 3
    Last Post: 12-19-2011, 04:37 PM
  2. Replies: 1
    Last Post: 12-18-2011, 01:52 AM
  3. Replies: 3
    Last Post: 12-06-2011, 11:32 AM
  4. Form opens table in datasheet view
    By franklbl in forum Forms
    Replies: 9
    Last Post: 03-23-2011, 09:43 PM
  5. Form - Datasheet View
    By kalove in forum Forms
    Replies: 0
    Last Post: 06-20-2007, 11:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums