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

Combobox can't be edited

Status
Not open for further replies.

DevM

Programmer
Nov 1, 2006
12
US
I have a combobox set up in an Access to allow the user to supply an answer to a questions in a continuous form. I bound the combobox to the table which will store all of the users answers. I created a valuelist of yes;no;N/A; (that part works just fine).
Form_load then creates a record set of the original table to work in. I even add a new line using rsform.AddNew to create a new record.
The problem is when I click on the dropdown I get my choices. But, when I click on a choice, the status line says, "Control can't be edited; it's bound to the expression '[tblFormQA]![Answer]'.
I know the dropdown has to be bound otherwise it won't work on a continuous form.
So, what am I missing? Any help would be appreciated.
 
is the combo box based on a query at all or its just a value list and if its just a value list please check to see if the form alllow edits = yes and if its to a query please not that you cannot edit in a query qhen it has linked tabled with multi lines

Hope i am helpfull!!!

 
How are ya DevM . . .
DevM said:
[blue] [purple]Form_load[/purple] then creates a record set of the original table to work in. I even add a new line using [purple]rsform.AddNew[/purple] to create a new record.[/blue]
Confusing this . . .

[ol][li]Are you talking the forms [blue]Load event[/blue] here?[/li]
[li]Is [purple]rsform[/purple] a DAO Recordset Object?[/li][/ol]


Calvin.gif
See Ya! . . . . . .
 
Oh, sorry. Yes, in the form load event I create a recordset using the original table.
rsForm is a DAO Recordset object.
The creation of the recordset works, I tested it in the immediate window. The new record is there. It's just the fact that the combobox won't update that's killing me.

Thanks
 
did you try in the form on current =combobox.requery?

if not try this and let me know
 
DevM . . .

You've updated the table thru rsForm but the [blue]RecordSource[/blue] of the form is still looking at its prior returned recordset on opening of the form. In your code you need to requery the form to see the added record:
Code:
[blue]   Me.Requery[/blue]
DevM said:
[blue]Form_load then creates a record set of the original table to work in . . .[/blue]
[purple]Whats the point of adding a new record this way when you could accomplish the same thing directly in the form and forget the code?[/purple]

Calvin.gif
See Ya! . . . . . .
 
theaceman will me.requery will bring me back to the first record in the field therfore i like using combobox.requery

 
Howdy IGPCS! . . .

Since the [blue]RowSource[/blue] of the combo is a [blue]Value List (static data!)[/blue], a requery of the combo is of no consequence ([purple]same data![/purple]).

According to [blue]DevM[/blue] the epitome of his post origination is:
DevM said:
[blue]The problem is when I click on the dropdown I get my choices. [purple]But, when I click on a choice, the status line says, "Control can't be edited; it's bound to the expression '[tblFormQA]![Answer]'[/purple].[/blue]
Hence a problem of selection . . . not combo content!

So . . . [blue]NO![/blue] . . . [purple]requery of the combo is pointless![/purple] . . . and in no way relates to the problem . . .

I can keep going but I'm sure you get the Idea . . .

Besides [blue]DevM [/blue] hasn't been back since yesterday [blue]3 Nov 06 9:51[/blue]

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
oh sorry i didnt realize that the source is a value list sorry about my comment

got me there

See Ya!..........
 
IGPCS . . .

No problemo! . . . we all do it! . . . The greatest talent in any forum is [blue]interpeting correctly![/blue] As long as I've been here and been exposed . . . [purple]too many times my interpretion is incorrect![/purple] . . . Thank God! . . . [blue]read misintrepretions are allowed![/blue] [thumbsup2]

Calvin.gif
See Ya! . . . . . .
 
Hi All,
Thanks for your input. I'll try the requery thing. But, I'm inclined to agree, it's not a problem with my value list.
I am one step closer to the answer thought. While I was tinkering with it I did discover in the properties window that there were some valid values for my comboboxes listed when you hit the down arrow. I tried one of those and it allowed me to use the box.
A little more investigation led me to a query which is limiting the scope of the entire form to only three values. I modified the query but it's still coming up invalid.

Not sure what I'm doing wrong. If it works for the old values it should work for the new.

Anyway I'll keep plugging along. Let me know if you think of anything.

Thanks,
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top