Results 1 to 2 of 2
  1. #1
    Lupson2011 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    68

    Filtering Forms

    Hi



    I am developing a database where there are two strands of funding, with people being able to apply to one or both. I have created two sides to the database (SChange & SImpact) to cater for this.

    Each side of the database has several tabs formatted for Project Details, Budget, Help.

    Now, what I wanted to do was to show all records on the SChange side as everyone would be applying to that strand. But, depending in they checked a certain box on the SChange side indicating whether they were applying to both strands or just the one, if I went in the SImpact side, it will only show the records that have indicated they are applying to both. Essentially adopting a filter for which I did the code below

    Private Sub Command117_Click()
    On Error GoTo Err_Command117_Click


    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "SImpactContactDetails"

    stLinkCriteria = "[ChangeAndImpact]= true"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Command117_Click:
    Exit Sub

    Err_Command117_Click:
    MsgBox Err.Description
    Resume Exit_Command117_Click

    End Sub


    This successfully only shows those records that are applying to both in the SImpact side and also automatically puts the contact details in (saving time inputting them again).

    Now, the problem comes with the other tabs, as the Project Details tab is the only one where the information between SChange and SImpact will be the same. The budget/help etc.. will be differernt information. But at the moment it automatically populates all fields withe same info

    Bascially, I am after a form filter with automatically data entry, but only on the first tab (project details). After that I want to put in different information.

    Is there a way I can do this, or do I have to approach the whole filtering thing differently?

    Any advice greatly received

    Bagpuss

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Should not put contact details into both tables. Have a table for People and then foreign key fields in the other tables for the PeopleID. Sounds like also need a Projects table and again foreign keys in the other tables for ProjectID.

    Do you want to provide project for analysis?
    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.

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

Similar Threads

  1. Forms and filtering with text boxes
    By jlgray0127 in forum Forms
    Replies: 1
    Last Post: 01-16-2012, 02:12 PM
  2. Filtering forms by date
    By rwest in forum Forms
    Replies: 1
    Last Post: 01-03-2012, 11:23 AM
  3. Filtering Forms
    By Iggsy in forum Forms
    Replies: 6
    Last Post: 11-23-2011, 01:01 AM
  4. Access 2007 Filtering Forms
    By mab in forum Forms
    Replies: 2
    Last Post: 05-20-2011, 06:14 AM
  5. Combo Box Filtering between Forms
    By andrew_ww in forum Access
    Replies: 3
    Last Post: 12-30-2009, 11:06 PM

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