Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    May 2003
    Location
    Kansas City, Kansas, USA
    Posts
    76
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ok, so I have an Access 2007 database and it is used to record account transactions. I have two tables one called TBL_Categories and a second called TBL_SubCategories. There are a list of categories (i.e. Income, Housing, Banking) and then in the TBL_SubCategories it lists the different types of the specific category (ie. Income = Wages & Salary, Investment, Other Income).

    I also have a table called TBL_AccountTransactions and in there I have both the Category and SubCategory fields that are combo boxes showing the lists from the corresponding tables.

    I am setting up a form that allows the user to enter a new account transaction. On the form, I would like to be able to select the category from the Category field then have the SubCategory field populate only the available choices, then have whatever they selected recorded into the table.

    I hope that this makes sense.....

    Thanks for your help!
    Rachel

  2. #2
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts
    What is in the TBL_SubCategories other than the list Wages & Salary, Investment, Other Income
    Does it have 2 columns one with the Main category in?
    If so I can attach a simple example.

    The Basic idea is the the query for the Sub Categories would be as below,
    assuming the fields in TBL_SubCategories are MainCat and SubCat

    Select SubCat From TBL_SubCategories Where MainCat = Forms!frmYouAreBuilding!cboMainCat

    On the Combo box for the Main Category on the Form you would need to set its AfterUpdate Event to Requery the SubCategory Combo Box

    I have NO idea what your field names are or the form name so this is just the principle.


    Andrew

  3. #3
    Star Lounger
    Join Date
    May 2003
    Location
    Kansas City, Kansas, USA
    Posts
    76
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you!!! I knew it was something easy... I really appreciate your response!

    Have a great day.
    Rachel

Posting Permissions

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