form data to update based on combo box

Jaye7

Registered User.
Local time
Tomorrow, 09:48
Joined
Aug 19, 2014
Messages
205
I have a form named CustomerForm
I have a query named CustomerQ.
On my form I have a combo box named combo6.
Combo 6 lists all of the company names from my customer table and includes the autokey field which is hidden.
When I click on a value in my combo6 I want the values on my form to then be based on the value from combo6 whereas at the moment I select a value in combo6 and nothing happens other than combo6 now displays a different value, can someone please help me out with how to refresh/ repopulate the data based on combo6 without having to create more forms and queries.
 
Do the following on a copy of the form:

1. Delete the combo box
2. Place a new combo box in the Header section of your form and when the Wizard comes up select the third option which reads, "Find a record on my form based on the value I selected... etc"

Follow the wizard through and the rest should be self explanatory.
 
Awesome, thanks for your help.
 
This worked on my home computer which is 2007, my work computer is 2010 and I don't have the third option, do you know the method for 2010?
 
Sorry, further to this question, I have the recordset number stored in a textbox and I want it to select the corresponding record in the combo box so that then my data updates, can you please advise how I would do that.
 
I don't completely understand. What do you mean by you have a recordset number stored in a textbox? You're using the wrong terminology so I suppose say it layman's terms.
 
Sorry, I have the ID stored in a textbox, so I have for instance the number 2 stored in it, I then want the data that is on my form to update to that record number, normally I would have to select the record through the combo box that you helped me with, but I also want the option to select the record based on the ID number in the textbox.
 
Ok what you mean is the ID field is bound to the textbox. You can't store values in a control.

Basically, a search control (i.e. textbox or combo box) should be unbound (i.e. it should not be linked to any field).
 
so how could I select that record based on the textbox value, can I do a select statement or something similar to make it select that specific record rather than having to manually click on the value in the combo box.
 
You can use the same code behind the combo box, but like I said, the textbox must be unbound.
 
Thanks, I tried some code to select the row in the combo box but it isn't working.

Code:
Dim s1 As String
s1 = Forms![VehiclesF]!Text33.Value
MsgBox s1
Combo35.Selected(s1) = True
Me.Repaint
 
I've mentioned it a few times but you still haven't confirmed whether the textbox is bound or not.
 
Ok, I just used a dlookup in the after update event and it is working well now, thanks for your help and patience.
 

Users who are viewing this thread

Back
Top Bottom