Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo box not allowing selection

Status
Not open for further replies.

striker73

MIS
Jun 7, 2001
376
0
0
US
I have a combo box that won't allow me to select a different value other than the default. I have been trying to figure out what's going on, but nothing seems to be working.

The form itself is tied to a recordset, but the combo box is set to load the rowsource when the form loads, so that it will only select certain values. Any ideas?
 
does your form allow edits? if not that is your problem.
is the combo box LOCKED? if so that is your problem.

if this is not the answer send along your rowsource.

g
 
I checked and the form allows edits and the combo box is not locked. It seems like the combo box is acting like it has a control source set, but I don't know what's causing it. In my Form_Load() function, I have the following code:

CompanyID = Me.Recordset.Fields("Company_ID")

cboClient.SetFocus

cboClient.RowSource = "SELECT [qryClientNames].[Client_ID], [qryClientNames].[Company_ID], [qryClientNames].[ClientName] FROM qryClientNames WHERE [qryClientNames].[Company_ID] = " & CompanyID

cboClient.Text = Me.Recordset.Fields("ClientName")

 
sorry i dont know what that Me.Recordset.Fields("Company_ID") stuff is. If i did this I would put
Code:
CompanyID = me.Company_ID
. But why don't you just have the sql statement in the rowsource of the combo box properties?

SELECT qryClientNames.ID, qryClientNames.Client_ID, qryClientNames.Company_ID, qryClientNames.CompanyName
FROM qryClientNames
WHERE (((qryClientNames.Company_ID)=[Forms]![Form1]![Company_ID]));

g
 
Thanks for your help! I tried that and it still does the same thing. It's pulling the proper values, but it won't let me select any other values. I have other combo boxes on the page and they work fine, but I can't figure out what's wrong with this one. :(
 
striker, i like to see you combo box if your don't mind. Maybe we can fix it.

ryanku@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top