When Selecting Org Name it is Adding to table

sbuckingham25

Registered User.
Local time
Today, 07:59
Joined
Jun 12, 2008
Messages
27
In my form, when I select a name from a combobox that is attached to a query it adds it as a new record to my contacts. I am only using the combobox to pull what customer I want from the contacts.

What am I doing wrong?
 
Sounds like the combobox is bound to a column in the table that is getting the data.

You need to unbind the lookup combo and filter the recordset whenever that combobox value has changed.
 
Thanks!

How do I filter the recordset?
 
When I unbound the combobox, I can no longer select anything in any of my comboboxes now....?????
 
I'm sure George is correct, the combobox is bound to the underlying field.

Scrap the current combobox

Add a new combobox to your form. The Combobox Wizard will pop up

Select "Find a record based on the value I selected in my combobox."

From the query the form is based on, click on the field you're searching by (your Customer field) to move it to the right side.

Hit Next.

Size the column appropriately.

Hit Next.

Name the combobox.

Hit Finish.

Now you can drop the combobox down and scroll down to the item to search by, or you can start to enter the item, and the combobox will "autofill" as you type. Hit <Enter> and the record will be retrieved.

Linq
 
Thank you! Unfortunetly, when I do this, the name I select isn't store in the query the form is based on. (I had to use a table for the value because it is searching the field not the query).

I have attached my db, it is the FrmTime&Materials form.
 

Attachments

I'm sorry, but your answer makes no sense! How can the name of the organization in the record you want to pull not be in the query the form is based on? And you haven't followed the instructions for using the Combobox Wizard; there's none of the code the Wizard would generate for this behind your form! Your AfterUpdate events of your comboboxes simply lock or unlock them. You cannot ask for advice and then simply ignore it and do what you want, using your own code! If your code worked, you wouldn't be here asking for help!
 
I'm sorry. I used the combobox wizard and when I pulled down the combobox, it only showed the dummy jobs I had created to test, not the actual contacts in the contact database. Plus the afterupdate was there before as we do not want the tech to be able to change the org name after he selects it.

I apologize.
 

Users who are viewing this thread

Back
Top Bottom