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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combobox not updating?



 
 
Thread Tools Display Modes
  #1  
Old April 19th, 2010, 04:32 PM posted to microsoft.public.access.queries
Farkyss
external usenet poster
 
Posts: 25
Default Combobox not updating?

I have a FORM for purchase orders. On this form there is a Customer ID field
whose values are listed in a combobox whose contents are pulled from a
Customer table - this ensures only customers in the database are used in the
purchase order form.

I also have a button "NEW CUSTOMER" which opens the Customer table at a new
record for a new record to be entered.

The problem is, when a new customer is entered, saved, and the customer
table closed, the combobox on the purchase order form is not automatically
updated, so the new customer's id does not appear in the list. Having to
close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a
required field, if you try save the record with no entry, then it clearly
fails.

Is there any way of forcing the combobox to update upon closing the other
form?
  #2  
Old April 19th, 2010, 04:41 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Combobox not updating?

Yes, use the OnClose event to go to the form that has the combo and Requery.
--
Build a little, test a little.


"Farkyss" wrote:

I have a FORM for purchase orders. On this form there is a Customer ID field
whose values are listed in a combobox whose contents are pulled from a
Customer table - this ensures only customers in the database are used in the
purchase order form.

I also have a button "NEW CUSTOMER" which opens the Customer table at a new
record for a new record to be entered.

The problem is, when a new customer is entered, saved, and the customer
table closed, the combobox on the purchase order form is not automatically
updated, so the new customer's id does not appear in the list. Having to
close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a
required field, if you try save the record with no entry, then it clearly
fails.

Is there any way of forcing the combobox to update upon closing the other
form?

  #3  
Old April 19th, 2010, 05:14 PM posted to microsoft.public.access.queries
Farkyss
external usenet poster
 
Posts: 25
Default Combobox not updating?

Karl, what macro code would be needed to achieve this? If you can suggest it
using placeholders for the names of the fields, i can keep my hair where it
is on my head

"KARL DEWEY" wrote:

Yes, use the OnClose event to go to the form that has the combo and Requery.
--
Build a little, test a little.


"Farkyss" wrote:

I have a FORM for purchase orders. On this form there is a Customer ID field
whose values are listed in a combobox whose contents are pulled from a
Customer table - this ensures only customers in the database are used in the
purchase order form.

I also have a button "NEW CUSTOMER" which opens the Customer table at a new
record for a new record to be entered.

The problem is, when a new customer is entered, saved, and the customer
table closed, the combobox on the purchase order form is not automatically
updated, so the new customer's id does not appear in the list. Having to
close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a
required field, if you try save the record with no entry, then it clearly
fails.

Is there any way of forcing the combobox to update upon closing the other
form?

  #4  
Old April 19th, 2010, 05:31 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Combobox not updating?

I did not test this --
OpenForm -- your form with combo
GoToControl - combo
ReQuery

--
Build a little, test a little.


"Farkyss" wrote:

Karl, what macro code would be needed to achieve this? If you can suggest it
using placeholders for the names of the fields, i can keep my hair where it
is on my head

"KARL DEWEY" wrote:

Yes, use the OnClose event to go to the form that has the combo and Requery.
--
Build a little, test a little.


"Farkyss" wrote:

I have a FORM for purchase orders. On this form there is a Customer ID field
whose values are listed in a combobox whose contents are pulled from a
Customer table - this ensures only customers in the database are used in the
purchase order form.

I also have a button "NEW CUSTOMER" which opens the Customer table at a new
record for a new record to be entered.

The problem is, when a new customer is entered, saved, and the customer
table closed, the combobox on the purchase order form is not automatically
updated, so the new customer's id does not appear in the list. Having to
close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a
required field, if you try save the record with no entry, then it clearly
fails.

Is there any way of forcing the combobox to update upon closing the other
form?

  #5  
Old April 19th, 2010, 05:38 PM posted to microsoft.public.access.queries
Farkyss
external usenet poster
 
Posts: 25
Default Combobox not updating?

As the form is normally open anyway, but underneath the current one, can you
refer to a specific existing open form instead of using OPENFORM?

"KARL DEWEY" wrote:

I did not test this --
OpenForm -- your form with combo
GoToControl - combo
ReQuery

--
Build a little, test a little.


"Farkyss" wrote:

Karl, what macro code would be needed to achieve this? If you can suggest it
using placeholders for the names of the fields, i can keep my hair where it
is on my head

"KARL DEWEY" wrote:

Yes, use the OnClose event to go to the form that has the combo and Requery.
--
Build a little, test a little.


"Farkyss" wrote:

I have a FORM for purchase orders. On this form there is a Customer ID field
whose values are listed in a combobox whose contents are pulled from a
Customer table - this ensures only customers in the database are used in the
purchase order form.

I also have a button "NEW CUSTOMER" which opens the Customer table at a new
record for a new record to be entered.

The problem is, when a new customer is entered, saved, and the customer
table closed, the combobox on the purchase order form is not automatically
updated, so the new customer's id does not appear in the list. Having to
close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a
required field, if you try save the record with no entry, then it clearly
fails.

Is there any way of forcing the combobox to update upon closing the other
form?

  #6  
Old April 19th, 2010, 07:18 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Combobox not updating?

Opening the form will just bring it to the top, so then you will also use
OpenForm on the other one to bring it back to the top.

--
Build a little, test a little.


"Farkyss" wrote:

As the form is normally open anyway, but underneath the current one, can you
refer to a specific existing open form instead of using OPENFORM?

"KARL DEWEY" wrote:

I did not test this --
OpenForm -- your form with combo
GoToControl - combo
ReQuery

--
Build a little, test a little.


"Farkyss" wrote:

Karl, what macro code would be needed to achieve this? If you can suggest it
using placeholders for the names of the fields, i can keep my hair where it
is on my head

"KARL DEWEY" wrote:

Yes, use the OnClose event to go to the form that has the combo and Requery.
--
Build a little, test a little.


"Farkyss" wrote:

I have a FORM for purchase orders. On this form there is a Customer ID field
whose values are listed in a combobox whose contents are pulled from a
Customer table - this ensures only customers in the database are used in the
purchase order form.

I also have a button "NEW CUSTOMER" which opens the Customer table at a new
record for a new record to be entered.

The problem is, when a new customer is entered, saved, and the customer
table closed, the combobox on the purchase order form is not automatically
updated, so the new customer's id does not appear in the list. Having to
close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a
required field, if you try save the record with no entry, then it clearly
fails.

Is there any way of forcing the combobox to update upon closing the other
form?

 




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 07:19 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.