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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box value cannot be changed in form view 1

Status
Not open for further replies.

CGSB

Programmer
May 23, 2006
35
CA
Hi, I have two combo boxes on my form whose value cannot be changed. If I copy these boxes to another form, they work! If I take a working combo box from another form, and insert into this form, it no longer works.

I think the problem might be with my SQL query. However, if I open the query outside the form (in datasheet view), the combo box works fine.

Here is my query:

SELECT [course].[course_name], [candidate_course].[status] AS status, [candidate_course].[year], [candidate_course].[quarter], [candidate_course].[file_no]
FROM course LEFT JOIN candidate_course ON [course].[course_id]=[candidate_course].[course_id]
WHERE ((([course].[set])="1") And (([course].[target])<>'cfsm') And (([course].[active])=-1) And (([course].[mandatory])=0));

Status and Quarter have text data types and use combo boxes as their display control in the Lookup tab.

Please help!
 
What exactly do you mean by: "it [combo box] no longer works."

You do not want user to change the text in combo box, right? Set, or make sure, the Style of the combo box to DropDown List.

HTH

---- Andy
 
Hi, thanks for replying.

The combo box is set to drop down.

To test it, I took a functional combo box from my other forms and put it on this problematic form, and I still couldn't change the value.

I think the problem might be with my SQL statement, but like I said, when I open the query, I can change the value and it gets stored in my "candidate_course" value. But when I use the form, I can't change the selected value (eg. It is set to "Yes", and I cannot change the selected value to "No" or "Pending").

I'm sorry if this sounds a little vague, just let me know if you need further explaination.

Thanks!
 
This rather sounds like it might not be a VB5/6 problem ...
 
If you can recommend a better forum, then please do.
 
The fact that you mention a 'datasheet' view suggests to me that what you actually want one of the Access forums, or perhaps one of the VBA forums.

Try forum702 or forum705 to start with
 
So, let me get it clear....

You have a drop down list with values:
Yes
No
Pending

When you click on it to select another item, you can not?

If that's the case:
Is the Enabled property of combo set to False? ie is it gray-out?
Or if the combo box is on the frame and you set the frame's Enabled = False, none of controls on that frame will be accesible.

---- Andy
 
No - I suspect that they have a Forms 2 dropdown combo box on an Access form, which is a completely diffeent kettle of fish
 
And indeed that seems to have been the case. The OP had appearsa to have had their problem solved in forum702 (thread702-1234012). Would have been nice if they'd said thanks for being pointed in the right direction ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top