sample database form(s) updating combobox

teiben

Registered User.
Local time
Today, 14:25
Joined
Jun 20, 2002
Messages
462
I have a form w/combobox, if not in list a subform popups and new user information needs to be entered/save which works fine, but i need the a) combobox doesnt requery - but instead I'm stuck in a loop, of do "do you want to reenter", does anyone have a sample of how they got this to work?
 
What version of Access are you using? If using 2007 or above, there is a non-code way to do it. If 2003 or below, then we need to see your code and see where it is going wrong.
 
using 2010: think your proposing ListItemEdit form, which calls up the form w/no problem, but when I try to return focus to the orginal form the combobox won't refresh to display the added record and asks the question again. I've played w/closing the main form, etc. then i figured someone must have had this problem and posted a solution, maybe not?
 
using 2010: think your proposing ListItemEdit form, which calls up the form w/no problem, but when I try to return focus to the orginal form the combobox won't refresh to display the added record and asks the question again. I've played w/closing the main form, etc. then i figured someone must have had this problem and posted a solution, maybe not?
You should not be trying to return focus to the original form when using the ListItemEdit. You just close the form which has been called. It will take care of the rest.
 
stuck on how to accomplish this since when i return focus to Form A from B it wants to loop back into the not in items list, figured there maybe another way....which is why i was looking for a sample db
 
How are you returning focus to form A from form B. Normally how it is supposed to go is this:

1. Create a form to be able to add new items to the table.
2. Put that form name in the ListItemsEditForm property.

When someone puts something in the combo which doesn't exist, it automatically asks if they want to add it. Then it opens the form for them to add the info. They add the info and close the form. Access automatically returns focus to the form with the combo on it and requeries the combo to add the value.
 
that's what I'm doing, the subform closes fine, but it returns focus to the combo form main (not updated), since the value is still in the combo box, it keeps asking do you want to update.....perhaps I need to clear the combo box?
 
Something isn't right then because it will not keep asking. So is it that your form that you have to add the value isn't really adding the value?

If you keep having problems with this, post a copy of the database so we can see what's happening.
 
it adds the value, but when it returns to main it's not showing the entire list (hasn't been requeried) and since it hasn't it wants to add it...stuck in a loop
 
Well, you seem to have something set incorrectly because for me it always adds it automatically to the list. If you can post a copy of the db with any sensitive data changed to bogus, I can take a look and try to figure out what is actually happening.
 
could you post a sample? the db i have is legacy w/tons on unnecessary (i suspect tables, and forms, would take 4ever to clean up), which is why i was seeking sample...i can compare settings. would greatly appreciate
 
How are you returning focus to form A from form B. Normally how it is supposed to go is this:

1. Create a form to be able to add new items to the table.
2. Put that form name in the ListItemsEditForm property.

When someone puts something in the combo which doesn't exist, it automatically asks if they want to add it. Then it opens the form for them to add the info. They add the info and close the form. Access automatically returns focus to the form with the combo on it and requeries the combo to add the value.


With reference to the above explanation I need some help regarding the little Icon where it says Edit List Items. My Query is can I have a list item which says "Add New" and when the user selects that Item a new form pops up to add a new field..?
 
With reference to the above explanation I need some help regarding the little Icon where it says Edit List Items. My Query is can I have a list item which says "Add New" and when the user selects that Item a new form pops up to add a new field..?

1. if you have combo boxes in your query then you are using lookups at table level and that isn't good. See here for why:
http://www.mvps.org/access/lookupfields.htm

2. You need to be using a combo box on a FORM for the Not In List to work.
 

Users who are viewing this thread

Back
Top Bottom