Nicholas
Nicholas

Reputation: 3737

Combo Box on form to filter table I imported into Access from Excel

I have been searching for a couple of hours but I can only see examples of combo boxes on forms filtering tables that are based from queries.

My table (which I have put on a subForm) is from a static datasheet that I imported into Access from Excel so therefore does not come from a query.

I want to use a combobox (or a textbox) so that the user can enter in the reference number and it will filter the table (rather than using the filters already provided (as they just get confused))

Is this even possible? I should add, the reason why I want the table showing (and not a query from it) is that I want the user to be able to edit the table once they have found the reference number they are looking for.

Any help would be much appreciated.

Upvotes: 1

Views: 793

Answers (2)

ASH
ASH

Reputation: 20302

I think your question is more about a ComboBox updating a view, right. I don't think this really has anything to do with Excel, right. If this is correct, please see the link below.

http://www.fontstuff.com/access/acctut17.htm

Also, see this.

http://www.fontstuff.com/access/acctut18.htm

Upvotes: 0

O. Gungor
O. Gungor

Reputation: 768

You can use the form's filter method to programatically filter the rows. careful though, as you probably are going to need a mechanism to remove the filter, like a separate button as it won't be obvious. OR, you may still want to keep the form's "Navigation Buttons" property to true. this would then have allow the user to see that the rows are filtered, and also allow them to remove the filter.

Use the form's filter methods to filter. so say they want to filter on a field called "value1" with value of 1, it would be like this. if your filter condition is text, then use single qoutes around them.

 Me.Filter = "[value1] = 1"
 Me.FilterOn = True

Upvotes: 1

Related Questions