By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,611 Members | 1,659 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,611 IT Pros & Developers. It's quick & easy.

Limit browseable records with combobox

P: 53

I have a little problem here..

when I create a form to browse trough records, everything works fine.
When I'm on a certain record and say, 'manufacturer' is on 'Apple' and I do a right click "filter by selection", I browse trough the records with only 'Apple' as manufacturer.

Why can't I edit the textbox to put Apple for example and then filter? I know this is possible while in datasheet view (by selecting 'apple' and then 'filter by selection', but this shouldn't be authorized for normal users (the datasheet view).
Or to do things better, the user could make a choice with a combobox. But the same problem occurs with that solution:

I can't select a value in the combobox to filter the browseable records. I only can see them, not click on them. I managed to make it clickeable, I don't remeber how, but then it changes that value of the current record, and this is not an action that should be authorized of course.

Anyone knows how to do this?
Aug 10 '09 #1
Share this Question
Share on Google+
6 Replies

P: 53
Or is this a limitation of Access?
Aug 11 '09 #2

P: 53
No one has an answer? Of is this a stupid question?? :$
Aug 12 '09 #3

Expert 100+
P: 1,287
I'm not sure what you mean when you say you can't select a value from a combo box. If you want to use a combo box to filter your form, you could put an unbound combo box in the form header, set it's record source to the manufacturers, and add code to it's AfterUpdate event.
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmbManufacturerFilter_AfterUpdate()
  2.     Me.Filter = "Manufacturer = '" & cmbManufacturerFilter & "'"
  3.     Me.FilterOn = True
  4. End Sub
Aug 12 '09 #4

P: 53
even if you didn't quite understand :p you got the answer.

Well, with "I can't select" I mean that i can open the drop down list from the combobox, but when I click on a value from the drop down list, it is like I never clicked.. the drop down list stays open and nothing changes.

So what I have to do is change my first combobox into a textbox (that will display the value for the current record, like other info (eg. 'serial number' or 'processor').
And then change the form header, by placing comboboxes in there, in order to filter the 'content' of the records.

Did I understand you right?
For me it wasn't logic to have one object to choose a value and another one to display a value, I wanted to do both with the same object, the combobox in this case...
Aug 12 '09 #5

Expert 100+
P: 1,287
You should be able to use a combo box to allow the user to change the value of the record in the table. Can't figure out at the moment why that would be locked and not allow you to select. Text box is fine for display though.

But, yes, the combo for filtering is a different story, and should not be bound to your table. Filtering doesn't affect the content of the current record, though. It makes your form only display some of the records in the underlying recordset. Is that what you're going for?
Aug 12 '09 #6

P: 53
yes, it is exactly that what I'm going for! Thanks for the help, again :D
Aug 12 '09 #7

Post your reply

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