Results 1 to 4 of 4
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Switching a form's source (Access97/SR2)

    What's the Access97 approved method for switching a form's source?

    I have developed a lovely form, command buttons hooked up to VBA code etc.

    I have a table CLIENTS where I go to see every record regardless of status ("Dormant", "Follow Up" etc)

    I have a Query FOLLOW UP based on table CLIENTS, where the query filters and sorts only those records from CLIENTS that are in line for a follow up call.

    On a regular basis, I work through the from FOLLOW UP, making 'phone calls and updating records and re-applying the filter. It's a job.

    Occasionally I want to flip into the TABLE file, as when someone refers me to another contact who I know is not going to satisfy the Query, but is in my Table.


    I think I want a command button or a drop-down list box on the form that gives me a choice of sources, but before I program the thing, I'd like to draw on any experiences the Access Forum crowd might have.

    I'm a man of the seventies, and I'm asking directions.

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

    Re: Switching a form's source (Access97/SR2)

    Chris,

    I won't pretend that I know the best method, but if you look at <!post=Post 132267, 132267>Post 132267<!/post> you'll find an attached demo with a combo box that allows you to switch the record source of a form.

    Good luck,
    Hans

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Switching a form's source (Access97/SR2)

    It sounds like what you really need to do is just set a filter on the original recordsource, then remove the filter when you want to view everything.

    But to specifically answer your question, all you need is to change the recordsource of your form, something like this:

    Me.Recordsource = "Select * From Customers Where .........etc."
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switching a form's source (Access97/SR2)

    > Me.Recordsource = "Select * From

    Thank you. Perfect! And simple, too!!!

Posting Permissions

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