Issues when an item is not already in combo box list (1 Viewer)

Right - the only thing I can think of so far is to compare the list before and after to find the new addition - but that seems very long winded.
 
so your form has all the user information on it, if you select a user from the combo box, that information is loaded into the form, including the other relevent information. So what you want to do is make it so you can manually fill out the user information and thus create a new user? Is this correct?

Is the client and quote information stored on different tables?
 
There are two tables - Client and Quote, likewise there are two forms Client and Quote.

From the Quote form the user must select a Client from the combo box - if they want to enter a new client into the system they will double click on the combo box, which takes them to the Client form. They then fill out all of the necessary info and return to the Quote form.

At this stage the new client has been added to the list of values in the combo box - but it is not automatically selected. This is what I am trying to achieve.

Hope that makes sense / is a bit clearer.
 
yep, i get it now...

ok, what i would do is set the client form to fill the quote form on close. I assume that the client form is used elsewhere in your db, so what you would probably do is have a global variable like destinationFlag as an integer, then on the client forms Save button have a select case which worked off the destinationFlag.

i.e.

Select Case destinationFlag

Case 1
save information
close

Case 2
save information
insert information into quote form
close

etc

I like doing things this way since it allows for the same form to be used in different parts of the db, without rewriting lots of code.



Also, unless you took my advice on going unbound, on your double click action, i would put something like Me.comboBox.undo (replace comboBox with your variables name)

This will remove anything that was typed into the combo box, thus removing the error you were receiving.
 
Hi,
I had similar problem and I manage to fix it. When I type in cutsomer name and if the clinent/ customer is not in list, a box appears asking if I want to add customer. By pressing yes, a new form opens where info is typed in, and when this new form is closed this customer is added and next field is selected.
However, the problem I am facing is if I add a new customer with the same name, the form adds him to the previous customer with the same name. How can I get this new customer to be added as new record. I do also have a special customer number for each csutomer, but I am not able to figure out any solution.

Kindly advise.
Thanks.
 
When you say 'the form adds him to the previous customer', what exactly do you mean?

How are you updating the customer table from the new user form?
 
Thanks Zaeed - your idea sounds good, I will do some playing around to try to get it to work.
 

Users who are viewing this thread

Back
Top Bottom