Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Access ComboBox Query Question

Access ComboBox Query Question

Scheduled Pinned Locked Moved Database
databasehelpquestionhtmlcom
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bassam Abdul Baki
    wrote on last edited by
    #1

    It's been a while since I've used Access. I have an Access database with three tables summarized as follows. Table1 - ID (Primary Key) - Title (Text) Table2 - ID (Primary Key) - Type (Table1.ID combobox lookup single select) - Other_Fields Table3 - ID (Primary Key) - Type (Table1.ID combobox lookup single select) - Data (Table2.Type combobox multiselect using a query) - Other_Other_Fields Without using a form, I would like the Data combobox in Table3 to display only the rows in Table2 where Table2.Type = Table3.Type (=Table1.ID). An inner join is what I'm using, but it's joined to Table1.

    SELECT Table2.ID, Table2.Type, Table2.Other_Fields
    FROM Table2 INNER JOIN Table1 ON Table2.Type = Table1.ID
    WHERE (Table2.Type=Table3.Type);

    Here's the problem, according to most of the examples that I've 'oogled, this is done by using a form and requerying the data upon combo update. However, I'm trying to implement this in the table. The problem that I'm seeing is that when I click on any of the Data fields in Table3, it uses the Type ID of the very first row in Table3. If I change that value of the first row's Type field, the table gets repopulated using this new value for all rows. However, if I click on the Home | Records | Refresh menu (not Refresh All), the row that is selected stays selected and the combobox gets populated with the correct data using that row's Type ID. So my question is, is there a workaround for this without using a form or am I banging my head against a wall? Is this a "by-design feature" (aka bug)? Thanks!

    Web - BM - RSS - Math - LinkedIn

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups