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

Updating a combo box

P: 5
I give up. I have spent hours trying to get a combo box to update when the user types in something other than what is on the list. I have tried the refresh, notin list, bribery UGH!!
The form I am using is based on a table--one of the fields is based on a combo box. In the AfterUpdate event, I entered Me. Refresh. Nothing. Tried Requery. Nothing. Tried the NotInList which got way too confusing.
I created a sample form with the source being the combo box table and created a combo box on the form based on the combo box table. In the AfterUpdate, I put in Me. refresh and it works great.
I believe the problem is that in the main form, it doesn't know what to refresh? I don't know. I just figured I had better stop short of pulling out my hair and alienating everyone around me with cries of frustration. Please don't hate me because I'm stupid.
Oct 17 '06 #1
Share this Question
Share on Google+
6 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
You said you tried requery. Did you try to requery the combo box or the form?



I give up. I have spent hours trying to get a combo box to update when the user types in something other than what is on the list. I have tried the refresh, notin list, bribery UGH!!
The form I am using is based on a table--one of the fields is based on a combo box. In the AfterUpdate event, I entered Me. Refresh. Nothing. Tried Requery. Nothing. Tried the NotInList which got way too confusing.
I created a sample form with the source being the combo box table and created a combo box on the form based on the combo box table. In the AfterUpdate, I put in Me. refresh and it works great.
I believe the problem is that in the main form, it doesn't know what to refresh? I don't know. I just figured I had better stop short of pulling out my hair and alienating everyone around me with cries of frustration. Please don't hate me because I'm stupid.
Oct 17 '06 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
Post the code you are using in the after update event of the combo box



You said you tried requery. Did you try to requery the combo box or the form?
Oct 17 '06 #3

P: 5
You said you tried requery. Did you try to requery the combo box or the form?
The only code I have used is Me.Refresh or Me. Requery. I put in the properties for the combo box. I created a test form based on the lookup table and a combo box based on the field in that table and Me.Refresh works great. But when I try it in my main form (which is based on a table where one of the fields is the combo box) it doesn't work. Someone told me to try using DISTINCT as the query, but I don't like the idea of having to rely on what's in the main table. It seems that this should be so simple.
Oct 18 '06 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
tey:


Me.ComboBoxNane.Requery
Oct 19 '06 #5

P: 5
tey:


Me.ComboBoxNane.Requery
I'v e decided to go the route on a self-query on the table. The database is going to be used by only one person who is comfortable with Access so I think it will work all right. Who knew it would be so difficult to add data to a combobox.

Thanks for the help.
Oct 19 '06 #6

NeoPa
Expert Mod 15k+
P: 31,342
Have you got 'Limit to List' set to 'Yes' for your ComboBox?

That might cause your problem.
Oct 20 '06 #7

Post your reply

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