473,473 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Combo Box Refresh -

5 New Member
I am currently building forms for a party based business. I have a form in which a user enters data and creates a new "party" in the "party" table. All parties have a host, and that host must be a customer (a customer doesn't have to be a host). So I have a combo box to select the host from the current list of all customers. If the host of the party is not on the list, I have a second form open that allows the user to enter a new customer(into the customer table). How can I have the contents of the original party form's combo box refreshed when I update & close the "add new customer" form? BTW...I also would to use the "Add New Customer" and combo box within my order entry form. Thanks.
Mar 20 '08 #1
2 1706
PianoMan64
374 Recognized Expert Contributor
What you're going to need to do is setup a requery of the combo box that has the customer list.

When you get to that point and create the customer, then click the create customer button and the button opens the customer form. When you close back out of the customer form and the Focus of the form is back onto the Party form, then the Combo box is automaticly Requeried.

Expand|Select|Wrap|Line Numbers
  1. Private Sub CreateCustomer_Click()
  2.     DoCmd.OpenForm "Customer", acNormal
  3. End Sub
  4.  
  5. Private Sub Form_Activate()
  6.     Me.CustomerID.Requery
  7. End Sub
  8.  
Keep in mind that the "CreateCustomer_Click" is the routine that will open the customer form, you need to replace it with the Customer form name that you've created in place of the one that I have in Code, and then simply make sure that the Party form as the code snippit inside it and you're good to go.

If you need any more help, let me know.

Joe P.
Mar 21 '08 #2
ggarz1
5 New Member
It worked like a charm. Thanks!
Mar 24 '08 #3

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

Similar topics

2
by: Lucinda Roebuck | last post by:
I'm using Access 97 on a Windows XP computer. The combo box on the form "form1" will not refresh after a new name is added to the list. The "limit to list" properties for the combo box is set to...
2
by: JumpinJeff | last post by:
I have a combo box that displays contact names. The recordsource contains ID and contact names (displayed as 0;1", column count 2, bound column 1). All works well except while changing records...
7
by: Doug | last post by:
Hi I have a combo box (A) that populates a following combo box (B) based on a selection. The selection from the first combo box (A) initiates an OleDbDataAdapter routine that extracts the...
5
by: Ant | last post by:
Hi, (Winform VS2003) I have a combo box bound to a typed data set. When the form loads, the combo box is popluated using a method containing the simple code below: ------------------------...
2
by: jay | last post by:
Hi. I have created an unbound combo box in a form whose purpose is to pass parameters to a query and then requery the requery. The unbound combo box is named "ClosedFilter" The two parameters...
6
by: dcyale | last post by:
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...
8
by: AA Arens | last post by:
Hi I do have a products table and products-parts table in my Access 2003 database and log all services into a form. I do have at least the following two combo boxes on my form: - Choose...
1
by: keri | last post by:
I would like to have a combo box on a form that shows the results of a query, however the query is variable and i am unsure how to do this. I have NO knowledge of code so very basc instructions...
7
by: billelev | last post by:
I have a query that selects data based on a particular date. This date is selected from a combo box on a form. The data from the query is then used to generate a report. This report can be...
4
by: lulu123 | last post by:
here's my problem 1) rowsource .RowSource = "select distinct , " & "from Projects " & " where =" & Me! I have the above code, and it works fine. however, i want to make the combo box in...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.