473,382 Members | 1,302 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,382 software developers and data experts.

Can't get combo box to accept data filtered on form.

I have a combo box that selects a particular teacher and filters the called form.

Private Sub Combo37_AfterUpdate()
DoCmd.OpenForm "frmAbsSEL", , , "[TEAM] = ' " & Me.Combo37 & " ' "
End Sub

This filters the records on the form just fine, but the combo box on the form
list all 2221 records instead of the selected 30 or 40 on the form.

From google, I have found that the combo box does not accept filters so
I have tried numerous suggested solutions but to no avail.

Does anyone know of a solution that actually works?
Nov 8 '06 #1
1 1211
MMcCarthy
14,534 Expert Mod 8TB
You can reset the row source dynamically:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Combo37_AfterUpdate()
  3.  
  4.   DoCmd.OpenForm "frmAbsSEL", , , "[TEAM] = ' " & Me.Combo37 & " ' "
  5.   Me.Combo37.RowSource = "SELECT ..."  '<fill in your statement here>
  6.   Me.Combo37.Requery
  7.  
  8. End Sub
  9.  
  10.  
Nov 8 '06 #2

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

Similar topics

3
by: dixie | last post by:
I have a form full of subforms which bring summary information onto the form from about 12 different tables. I am trying to get all of that summary information (mainly numbers) into 1 large table...
1
by: Aravind | last post by:
Hi folks. My database project has the following: -------------------------------------------------------------------------------- tables: Member: MemName, MemNo , MemType, CourseFaculty...
8
by: bbdata | last post by:
ok i have a problem here and not much time to play round. have a form bound to a table. one of the combos is bound to a field Agents. i have active and retired agents. thing is, i want to be able...
4
by: jcazmail-groups | last post by:
I have a child form that has a combo box whose underlying query needs to be filtered by a value from a combo box on the parent form. I have succeeded in doing this by putting the following SQL in...
1
by: flamethrower01 | last post by:
Hi, I have a form (with 4 subforms) which is filtered by 3 combo boxes. Upon loading the form, the form populates fine. After the first combo box, the form works fine. After the second one...
2
by: SPOILED36 | last post by:
I am building a database to track attendance. I have one main form with multiple subforms. Within one of the subforms name sfrDailyAttendance, I also have cascading combo boxes (cboCategory and...
2
by: cawkwell | last post by:
I have a form which loads a recordset. Within each row I want a combo box which is loaded by values from another table filtered by a value from a column on that row. I have set the Row Source of...
3
by: razjafry | last post by:
Hi, I am trying to create a combo box to search record on the base of ID but it gives runtime error message 2501 "the openform action was cancelled" all the times. I posted this question before but...
1
by: zufie | last post by:
Hi, When I make a selection from the drop down list of values on a Combo Box. The Combo Box is on a Form. The Combo Box selection appears on ALL of the records. That is, when I select one...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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.