Combo Box not filtered like the form is filtered (1 Viewer)

sladetroityer

Registered User.
Local time
Today, 11:31
Joined
Oct 26, 2011
Messages
149
How do I get a combo box to be filtered the same way that the form that it resides on is filtered?

My form is filtered with a macro and then I added a combo box to it and the dropdown menu is displaying ALL of the data instead of the filtered data.

ACCESS 2010
 

vbaInet

AWF VIP
Local time
Today, 19:31
Joined
Jan 22, 2010
Messages
26,374
Is the form a Single form, a Continuous form or a form in Datasheet view?
 

sladetroityer

Registered User.
Local time
Today, 11:31
Joined
Oct 26, 2011
Messages
149
It's a single form.

Oh and remember the whole Layout Tab issue that I had. It was the Access Options, Current Database, Enable Layout View check box..... No idea how it got unchecked.....
 

vbaInet

AWF VIP
Local time
Today, 19:31
Joined
Jan 22, 2010
Messages
26,374
So how is the form filtered? For example, by entering text into a textbox and clicking a button?
 

sladetroityer

Registered User.
Local time
Today, 11:31
Joined
Oct 26, 2011
Messages
149
The form is filtered by two macros. When the AVE button is clicked and AVE macro set's the TemVar to a specific number and then a macro with the instructions on how to filter is ran which brings up the filtered form based off the Employee Query
 

vbaInet

AWF VIP
Local time
Today, 19:31
Joined
Jan 22, 2010
Messages
26,374
And this filtered ID is also a field in your form's record source right?

You need to put the full reference to this field in the Row Source of your combo box. Then add an extra action in the macro to requery the combo box.
 

sladetroityer

Registered User.
Local time
Today, 11:31
Joined
Oct 26, 2011
Messages
149
Yes. The records are being filtered by Department description or Lowest Level department description and they are both on the employee search form which contains the combo box.
 

vbaInet

AWF VIP
Local time
Today, 19:31
Joined
Jan 22, 2010
Messages
26,374
In case you don't know how, this is how what a full reference should look like:
Code:
[Forms]![[COLOR=Red]FormName[/COLOR]]![FieldName]
 

sladetroityer

Registered User.
Local time
Today, 11:31
Joined
Oct 26, 2011
Messages
149
The Combo box has the employee names in it, not the Department description so how whould that work?
 

sladetroityer

Registered User.
Local time
Today, 11:31
Joined
Oct 26, 2011
Messages
149
SELECT [qselEmployeeInformation].[strFirstName], [qselEmployeeInformation].[strLastName] FROM [qselEmployeeInformation] ORDER BY [strFirstName];

This is what is in the combo box now.
 

vbaInet

AWF VIP
Local time
Today, 19:31
Joined
Jan 22, 2010
Messages
26,374
So how do you expect to filter the row source of the combo box if none of the fields you described in post #11 are not present?
 

sladetroityer

Registered User.
Local time
Today, 11:31
Joined
Oct 26, 2011
Messages
149
Ha, that's a good question. I wasn't sure if it was even possible.
 

vbaInet

AWF VIP
Local time
Today, 19:31
Joined
Jan 22, 2010
Messages
26,374
Give it some good thought or drop the idea completely. ;)
 

Users who are viewing this thread

Top Bottom