Results 1 to 2 of 2
  1. #1
    ShostyFan is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    76

    VBA table filter

    I have a customer table of which a small percentage of customers are in a recurring monthly billing program, a check box separates the two groups of customers.
    Every month I get an excel sheet that tells which customers had a successful auto payment processed. I import the sheet to a new table called AccountPayments.
    I want to be able to view the AccountPayments data from only customers that are in the monthly billing program (checkbox = true). Joining the two tables and achieving the results via query join type gets me the information I want but I can’t edit field data once the join is created. A form/subForm is also not an ideal situation.
    Ideally VBA will filter out customers that no longer have active billing charges
    so when I open a form of AccountPayments table data VBA only returns account Payments from current customers (checkbox = true) from the Customer table.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Does each of your tables have a primary key field?

    If neither has a primary key you won't be able to create an updatable query.
    If one of your tables has a primary key but the other doesn't the link must include the primary key field.

    In other words your ACCOUTPAYMENTS, I'm guessing, has a primary key, but it's an autonumber or something. *NOT* the customerID which is what you'd need to link to the customer table to find out which ones were on a billing program. If you can not/do not want to use a form/subform arrangement you may need to use some unbound controls to be able to do the data entry and not create the form on a non-updatable query.

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

Similar Threads

  1. How to save results from a filter into a table
    By jmmunoz2141 in forum Access
    Replies: 2
    Last Post: 03-04-2014, 09:09 AM
  2. Replies: 5
    Last Post: 12-08-2011, 10:52 AM
  3. Table drop down list filter
    By jbataille86 in forum Access
    Replies: 2
    Last Post: 08-05-2011, 08:37 AM
  4. filter DB table from Front end
    By A S MANN in forum Programming
    Replies: 2
    Last Post: 04-21-2011, 05:23 AM
  5. Filter a table's columns
    By e.badin in forum Programming
    Replies: 3
    Last Post: 04-20-2011, 09:53 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