Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form and Query problem (Access 2003)

    I am new to Access and I have an ambitious project. I am building a database for a charity to track donations.
    The donor information is stored in one table and donations in another tied together by donor #.
    Since this application will last for a number of years, I have to record all donations and the date received. The user will mainly want to view a donor's donations on a yearly basis.
    I can build a query to view each donor's yearly donations. How can I make this happen through a Form interface?
    The user would be viewing the donor's record info and then merely enter the desired year into a field on the form and press enter to start the query. The results would then be displayed in the space on the main form.

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

    Re: Form and Query problem (Access 2003)

    If you want to view the results in the form, you can create a subform to display the donations, linked to the main form by donor number and year.
    First create a query based on the donations table, and add a calculated column Y: Year([DateReceived]) where DateReceived is the date field.
    Then create a continuous form based on this query. Save this form, then place it on the main form as a subform.
    You will probably have to enter the Link Master Fields and Link Child Fields properties of the subform manually.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form and Query problem (Access 2003)

    Thank you for the immediate response. Please help me understand your suggested solution.
    I have the query with donor #, donation amount, and donation date. This lists all donations with the asssociated date.
    I do not understand your reference to a calculated field for the date.
    When I enter the year portion of the date in the criteria field under the donation date, no entries in the list are returned by the query.
    Norman

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

    Re: Form and Query problem (Access 2003)

    You don't need criteria in the query, but you need the year as a calculated value in order to link the subform based on the query to the text box or combo box on the main form in which the user enters/selects the year.

    I have attached a simple demo using stripped-down tables from the Northwind database. Open frmEmployees in design view, click once on the subform, and look at the Data tab of the Properties window to see how the subform is linked to the main form.

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form and Query problem (Access 2003)

    Thanks. I will go and study your example.
    Norman

Posting Permissions

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