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

Cannot change a combo box's value 2

Status
Not open for further replies.

CGSB

Programmer
May 23, 2006
35
CA
Hi, I have a combox box (selStatus) with the following values:
Yes
No
Pending

This combo box appears on a form which uses a query as it's record source. 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));

When I run the query, I can change the value of the combo box and the value is stored in the candidate_course table. But when I use my form (with the combo boxes control source set to status, I cannot change the value.

For example, the current value is set to "No", I want to change it to "Yes". I click on the combo box, the list of values drops down, I click on "Yes", and nothing happens.

Please help!
 
Is AllowEdits set to "No"? If not, read on:

What do you mean record source? You need to use the query as "Row Source" and the Field(on table NOT on query) as Control Source. I don't think you can write to or modify a query output from your form. Hope this helps.

 
The AllowEdits was set to "No". Now the values change fine in the form.

Now I put this form as a subform in another form, and the problem came back. The parent form's AllowEdit is set to "Yes".

Besides that, I've discovered a rather odd problem with my parent form (it tries to delete a record when I change tabs). I'm just going to have to start over again. I should have just hardcoded everything instead of using form and control properties.

Thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top