Results 1 to 4 of 4
  1. #1
    ungoliat is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    2

    Post Setting a Filter on a dynamically created Table

    Hi All,

    I am currently working on a Database to automatize some process. Quick explanation:

    The User can import a CSV (Text) File via a DialogBox, which gets imported into a Table. After this, the content has to be filtered, setting conditions on 4 different rows. The new Table gets exported into a new CSV (It has to be CSV, since it later gets imported into SAP)

    I am having some trouble with filters though:

    How can I set a Filter on a dynamically created Table (using VBA)?

    Best case would be to save the filter into my Import spec, but Access doesn't seem to have this option (?)

    Can somebody help?

    Thanks in advance

    Regards

    Alex

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Alex,

    Give us some sample data and show your data in and data out so users can understand your need.

    There was a post recently dealing with importing on specific records that may be useful to you.

    Good luck with your project.

  3. #3
    ungoliat is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    2
    Hi Orange,

    Thanks for the fast reply and the helpfull Link. It is kind of what I want to do, although I dont think th guy in that Thread was using CSV, since that code is not working for me.

    Yeah, sorry, I am going to try to express my need as best as possible:

    I Have a table like this:

    Code:
    ID                           PersonalNr                   Perskat               Joined
    1                            800000                       2020                   22.01.1990
    2                            800004                       8080                   23.10.1985
    3                            865145                       4040                   24.05.2000
    4                            874563                       3435                   30.1.2014
    It gets imported like that. Then I have to set a filte (or a couple of filters): I only need the rows where perskat<>8080, Joined < 01.01.2000 and 874563>PersonalNr>770000, as an example.

    The output would look somewhat like this:

    Code:
    ID                           PersonalNr                   Perskat               Joined
    1                            800000                       2020                   22.01.1990
    4                            874563                       3435                   30.1.2014
    I hope i was able to explain it well.

    It is quite easy to set these filters, but not dynamically with VBA, which is what i want so I dont have to filter myself everytime.

    Thanks again

    Regards

    Alex

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Where is the csv you were talking about?

    since that code is not working for me.
    What exactly did you try?

    You should be able to do what you need with 1 table and a series of queries --but we still don't know the details of your requirements.

    Can you provide sample data from the csv you're starting with and a group of csv's you need from that initial csv?

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

Similar Threads

  1. Replies: 0
    Last Post: 02-25-2015, 08:09 AM
  2. Need help setting up a filter again.
    By 82280zx in forum Queries
    Replies: 5
    Last Post: 02-14-2014, 02:13 PM
  3. Replies: 2
    Last Post: 04-21-2012, 11:17 PM
  4. Setting crosstab headings dynamically
    By dougie in forum Queries
    Replies: 3
    Last Post: 01-18-2012, 12:47 PM
  5. Replies: 2
    Last Post: 09-21-2011, 07:23 AM

Tags for this Thread

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