473,379 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Filtered dropdown list

I have two tables: attendee and seating.
The seating table has the fields:
[TableID], [Tablenum], [Seatnum], [AssignID]
As tables are set up, the records for each seat are populated in the seating table.

This is for a fundraiser where the amount of tables that are set up will depend on the number of attendees that preregister and the possibility of others showing up the night of the event. The more people, the more dining tables will be set up.

With that background, to make assignments, I would like to use the seating table and then have a dropdown of non-assigned attendees show up as potentials in my list. So,in the seating table, [tablenum]= 1, [seatnum] = 1 I click on the dropdown and (lets say) I have 20 options. I select person A. I proceed to the next record and click on the dropdown of attendees who are potential assignees. This time, person A is not visible because they have been assigned leaving me with 19 options. I hope this makes sense.

I am using Access 2010. There might be a better way to do this and any suggestions welcome! Conceptually I know what needs to happen but I rarely work in Access and things have gotten <very> rusty. Thanks!
Nov 15 '13 #1
4 1256
This should be pretty easy by using a query for your data source on the combo box / drop down. Just use the event After Update to do a me.ComboBox.requery for the combo box of attendees. SO the query feed the combo box has the criteria where their ID is NOT in the table for folks selected. You could do this with an outer join from your main table that gets the Table number and Assignee number then on the Assignee to Assignee ID do where is null (meaning there record does not exist) in the main table - Hope that is not confusing.
Nov 15 '13 #2
Is there an example out there to demonstrate this? I created two queries: one showing tables without assignees and another that included the two tables that then displayed only those individuals unassigned. How to automatically link this in a datasheet view is leaving me stumped.
UPDATE: The dropdown I have works in the query mode but there is not an option to apply an action. I have to hit the F5 key every time I enter the new value. Here is a link the the file:
[z{Moderator Edit{Redacted External link to cloud drive - External links to such files are not stable to the thread; thus not helpful in the long term}]
Nov 18 '13 #3
Here is the sql statement based on those two tables. I set up the first exactly like you have it. The second table, the Assignee table I assume would be a "person or people" table and have a unique ID for each person and then stuff like name, etc.

[code]

Expand|Select|Wrap|Line Numbers
  1. SELECT tbl_Seating.TableID, tbl_Seating.Tablenum
  2.    , tbl_Attendee.AssignID
  3. FROM tbl_Seating 
  4.    LEFT JOIN tbl_Attendee 
  5.       ON tbl_Seating.AssignId = tbl_Attendee.AssignID
  6. WHERE (((tbl_Attendee.AssignID) Is Null));
Nov 19 '13 #4
Thanks! That worked; most helpful!
Nov 19 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
1
by: Ian Davies | last post by:
Hello In a php file I have a drop down list with index numbers in whos default value is feed into an sql query that filters records from my database and displays them in an html table. Trouble...
6
by: Mark | last post by:
I have two dropdown lists. Both have autopostback set to true. In both dropdowns, when you select an item from the list, it redirects to the Value property of the dropdown. Nothing fancy. ...
4
by: Paul | last post by:
I have a dropdown list box and a button on a web form, the autopost back is false for the dropdown list box and button. When the button is pushed the selection in the dropdownlist box is lost,...
5
by: jung_h_park | last post by:
From: jung_h_park@yahoo.com Newsgroups: microsoft.public.dotnet.framework.aspnet Subject: Dropdown List not retaining its SelectedValue Date: Mon, 26 Jun 2006 21:02:57 -0700 Hello, My...
3
by: er1 | last post by:
Hi all, I have created a double dropdown list. Based on the first list selection, second list populates (this works fine). I have a submit button, which when clicked should run a select query...
6
by: yasodhai | last post by:
Hi, I used a dropdown control which is binded to a datagrid control. I passed the values to the dropdownlist from the database using a function as follows in the aspx itself. <asp:DropDownList...
0
by: Andrus | last post by:
I'm using WinForms DataGridView I need to make dropdown list wider that grid column width. I tried the following code, but dropdown list widht is the same as column width. How to increase...
3
by: fish919 | last post by:
Hello All, I am creating a date base in access. I want to create a dropdown list box that is connected to another dropdown list box. You start with a dropdown list that has 5 choices and each of...
5
by: abhi3211 | last post by:
i am using java inside java script page. in that page i want to use two dropdown list. in first dropdown list i am getting data from ms-access database. in second dropdown list i want to get data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.