edit data in table directly through textbox?

qwertyjjj

Registered User.
Local time
Yesterday, 19:58
Joined
Aug 8, 2006
Messages
262
Hi
I have a form, which displays data from a query recordsource.
One of the textboxes is a "Comments" textbox, which I would like the user to write in directly, which in turn is a direct link to the data in the table so it is updated immediately.

At the moment, the textbox does not seem to be editable. Is there a standard way to do something like this ?
 
Is the textbox's 'Locked' property set to No?
If so, is the 'Enabled' property set to 'No'?
If not, how about the form's properties?
 
Locked is No
Enabled is Yes
Can't see anything on the form properties but might be missing something.

None of the control boxes are editable so it's as though they're not linked to the data somehow. All values in the textboxes have come from a query.
 
If the form is set to not allow edits, that might cause a problem.

What are the settings under the Data property tab for the form?
 
Allow Filters Yes
Allow Edits Yes
Allow Deletions Yes
Allow Additions Yes
Data entry Yes
Recordset type Dynaset
Record Locks No locks
Fetch defaults Yes
 
So, what's the best way to go about this then? Using the onchange event of the control box to trigger a database update, which I can do through VBA code maybe ?
Any of the other events better then onchange, which may do it for every character that is typed ?
 
qwertyjjj said:
So, what's the best way to go about this then? Using the onchange event of the control box to trigger a database update, which I can do through VBA code maybe ?
Any of the other events better then onchange, which may do it for every character that is typed ?

I think VBA is the way to go. Try putting it in the AfterUpdate property of the field. I've had a similar problem and that seemed to do the trick.
 
As the box is locked, would I need to populate it with some VBA code first ?
 
Just to clarify, even if I add a separate text box on the form, I still cannot edit it even though it has no data in it.
What's that all about ?
 

Users who are viewing this thread

Back
Top Bottom