Results 1 to 10 of 10
  1. #1
    Star Lounger
    Join Date
    Jun 2003
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Filter Forms in Access (97 SR2)

    I am using an Access front end on a SQL database. I have created a filtered form and wish to open a new tabbed list form based on the criteria of the original form, does anyone know how to do this?

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter Forms in Access (97 SR2)

    Could you take the original forms Filter setting and in whichever event you're using, set the Filter property of the new form <img src=/S/question.gif border=0 alt=question width=15 height=15>

  3. #3
    Star Lounger
    Join Date
    Jun 2003
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter Forms in Access (97 SR2)

    I don't think I explained it very well!! What I want to do is use the original form filter as the default value in a field on the new form, if that makes any sense. For example the original form showed an organisation, by clicking on a button you can view a list of all budgets for that department, in the new form if I was to enter a new budget I don't want to have to enter the organisations ID, I'd like that as a default value. I'm new to VB and struggling, if you can help I'd really appreciate it.

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Filter Forms in Access (97 SR2)

    Yes, I think so, but we are going to need more details to help you. By a filtered form, I presume you are refering to a form that displays one record from a set of data records, but I don't understand what you mean by "tabbed list form." In general you use a command button to do this sort of thing, and you use a WHERE condition to open the second form, but the devil is in the details. It would also help to know what your level of experience with VBA and Access is.

    I see you answered some of the questions I had while I was typing <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Wendell

  5. #5
    Star Lounger
    Join Date
    Jun 2003
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter Forms in Access (97 SR2)

    Can you let me know what additional details you could do with? Basically I'm a SQL developer but am needing to use Access as a front end and it's the first time I've really had to use VB with Access.

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Filter Forms in Access (97 SR2)

    Your answer to Steve filled in some of the gaps, but I'm still not sure what a tabbed list form looks like.

    We often use combo boxes to display a set of choices a user can make - list boxes are another option though they are more complicated, especially when you make them multi-select. In general for those type of controls, we set a value on the new form based on the current record being displayed in the original form, and we use a SQL statement that refers to the value of the control as the row source for the combo or list box.
    Wendell

  7. #7
    Star Lounger
    Join Date
    Jun 2003
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter Forms in Access (97 SR2)

    I used a tabbed list form, to describe a form showing a filtered list of data, as opposed to a form that only shows data relating to one record.

    In the original form I used a combo box to select the record I want, what code do I use in the 2nd form to get the data held in the combo box in the first form and use it as a default value?

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter Forms in Access (97 SR2)

    There are example databases with various user interface tips and tricks on Microsoft's site at
    http://www.microsoft.com/AccessDev/Articles/solover.htm

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Filter Forms in Access (97 SR2)

    Are you speaking VB? Access forms and controls are a bit different, so we aren't being dense, we're just tyring to get our heads around the description so we can figure out how to help. If you want to use the value from the combobox in the first form to filter the data in the second and you use the DoCmd.OpenForm statement to open the second form, you can pass in a WhereCondition that will open the second form with only the specified records (assuming the second form is bound to a data source). If the second form is unbound or you need to extract the combobox value after the fact, you can refer to it in code or in a controlsource using the syntax Forms!FormName!ComboboxName.
    Charlotte

  10. #10
    Star Lounger
    Join Date
    Jun 2003
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter Forms in Access (97 SR2)

    Thank you, that does exactly what I want.

Posting Permissions

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