A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

combo box that updates outside table and then needs to be requeried



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2005, 05:05 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default combo box that updates outside table and then needs to be requeried


Hello,
I have a main form with about 6 tabs. On one of those tabs is a
subform. On the subform, which is used to populate a table, is a combo
box to look up company values from another table. I put an dbl click
event on the box, so that if the company is not listed in the drop
down, the user can dbl click and another form will open that updates
another table. This outside form works well, but when I go back to the
subform the new entry is not listed in the combo box, unless one closes
the whole main form and then goes back into it.

How do I get the combo box to requery and show the results of the
updated underlying table. I have put the me.requery code in both the
independent form that one enters the new data, and the subform, but
neither works correctly.

Any help greatly appreciated


--
mbs4653
------------------------------------------------------------------------
mbs4653's Profile: http://www.hightechtalks.com/m388
View this thread: http://www.hightechtalks.com/t2300064

  #2  
Old December 2nd, 2005, 08:08 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default combo box that updates outside table and then needs to be requeried

In the OnClose event of your data entry form, put
Forms!MainFormName!SubFormName!ComboBoxName.Requer y


mbs4653 wrote:
Hello,
I have a main form with about 6 tabs. On one of those tabs is a
subform. On the subform, which is used to populate a table, is a combo
box to look up company values from another table. I put an dbl click
event on the box, so that if the company is not listed in the drop
down, the user can dbl click and another form will open that updates
another table. This outside form works well, but when I go back to the
subform the new entry is not listed in the combo box, unless one closes
the whole main form and then goes back into it.

How do I get the combo box to requery and show the results of the
updated underlying table. I have put the me.requery code in both the
independent form that one enters the new data, and the subform, but
neither works correctly.

Any help greatly appreciated


--
mbs4653
------------------------------------------------------------------------
mbs4653's Profile: http://www.hightechtalks.com/m388
View this thread: http://www.hightechtalks.com/t2300064


  #3  
Old December 3rd, 2005, 06:56 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default combo box that updates outside table and then needs to be requeried


To jleckrone,

Thank You! That works great! Saved me endless circle hours!


--
mbs4653
------------------------------------------------------------------------
mbs4653's Profile: http://www.hightechtalks.com/m388
View this thread: http://www.hightechtalks.com/t2300064

  #4  
Old December 10th, 2005, 01:44 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default combo box that updates outside table and then needs to be requeried

On Fri, 2 Dec 2005 18:05:18 +0100, mbs4653
wrote:

How do I get the combo box to requery and show the results of the
updated underlying table.


Use the Combo's NotInList event instead.

John W. Vinson[MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.