not on list

JulieFall

New member
Local time
Today, 19:36
Joined
Dec 12, 2002
Messages
7
I have created a form that requires I enter Customers Name and other items. My Customers name is in a drop down, when I enter a Customer not on my drop down it automatically goes to my "enter new customer form" thats great. Though when I close the "enter new customer form" and back into the orginal form the customer I just added is not in the list. Only when I go out of the form and back into it will it appear. I would like to prevent my users from having to do that. I will have to repeat this process for Vendors, Sub-Contractors and part numbers, so going in and out is not very efficient.

I am new to Access so please talk in elementary level ;)

Thanks

Julie
 
What you might want to try is to create a macro on your new customer info form exit button. When you close your new customer form, the macro will also close the order form then reopen it simultaneously so your users don't have to back out and re-open. On the command button for close or exit on the new customer form, create the macro on the "on click" event then follow the macro instructions.
 
Don't go through the hassle of creating a macro to close and then open the form. All you need is to requery the combobox on the main form.

Here's a simple solution. Go into design view of the form where you have them enter the new customer. Open the Properties window if it isn't already. On the EVENTS tab of the form's properties, find the On Close event. Click in the space that is open for you to type and select EVENT PROCEDURE. Then click on the elipses ... that appear to the right of the words Event Procedure.

Then when the Code Window opens, type this between the parts that say Form1_Close() and End Sub:
(Form1 will actually be whatever your form name is)

Forms!YourMainFormName.YourComboboxName.Requery

Then, when the form closes, it will requery your combobox, which then should have the new value there without closing and reopening the form.
 
No In List

Thanks for the tip.

Is there a way to have the new data placed in to the original combobox when the 2Add new data" form closes instead of having the user select from the drop down list?

Mousemat
 

Users who are viewing this thread

Back
Top Bottom