ADO Data Control and Bound Controls 
Author Message
 ADO Data Control and Bound Controls

My application binds controls (text boxes, etc.) to ADO data controls,
whose Recordset property is set in code to an ADO Recordset object.

This works fine.

However my problem is this: if the user changes a text box and then
clicks on a button that is OFF the current form, in particular on a
toolbar on an MDI form, the change to the text box is not "committed" at
that time, like it would be if the user forst clicked on some other
control on the current form.

So I can't for example implement a "Save" on the toolbar.

Can anyone explain how I can do this? Any help much appreciated.

-- BobC



Mon, 16 Dec 2002 03:00:00 GMT  
 ADO Data Control and Bound Controls


Quote:
> My application binds controls (text boxes, etc.) to ADO data controls,
> whose Recordset property is set in code to an ADO Recordset object.

> This works fine.

> However my problem is this: if the user changes a text box and then
> clicks on a button that is OFF the current form, in particular on a
> toolbar on an MDI form, the change to the text box is not "committed"
at
> that time, like it would be if the user forst clicked on some other
> control on the current form.

> So I can't for example implement a "Save" on the toolbar.

> Can anyone explain how I can do this? Any help much appreciated.

> -- BobC

I'd suggest place a toolbar on the child form and use it for all data
navigation, editing etc. What I did was create a template form with
such a toolbar, using ADO code for all db manipulation. The code was 14
pages long when printed, but now when I want such a form, I simply add
the template to the project and tweak it as required. Saves a lot of
typing.
Dave
--
dcward

Sent via Deja.com http://www.deja.com/
Before you buy.



Wed, 18 Dec 2002 03:00:00 GMT  
 ADO Data Control and Bound Controls
Isn't there a .lostfocus event for the form which holds your textbox ? Could
you implement your save there?

Len C



Fri, 03 Jan 2003 03:00:00 GMT  
 ADO Data Control and Bound Controls
Bob,

First you can do a 'Lost Focus' event update for either your text boxes or
your form.  Second, you can also create a timer function that automatically
does updates at a specified interval..

--

Sincerely,
Todd B - Agendum Software

AgTransform - Major Update!! Now has 'true' translucency!  Create forms,
dialogs and more with 'see through' screens! All using point and click
functionality - NO Code!


Quote:
> My application binds controls (text boxes, etc.) to ADO data controls,
> whose Recordset property is set in code to an ADO Recordset object.

> This works fine.

> However my problem is this: if the user changes a text box and then
> clicks on a button that is OFF the current form, in particular on a
> toolbar on an MDI form, the change to the text box is not "committed" at
> that time, like it would be if the user forst clicked on some other
> control on the current form.

> So I can't for example implement a "Save" on the toolbar.

> Can anyone explain how I can do this? Any help much appreciated.

> -- BobC



Fri, 03 Jan 2003 03:00:00 GMT  
 ADO Data Control and Bound Controls

The LostFocus event would have to be on the text box.  The form itself can't
get or lose focus if it has any control on it which is capable of receiving the
focus.


Quote:
> Bob,

> First you can do a 'Lost Focus' event update for either your text boxes or
> your form.  Second, you can also create a timer function that automatically
> does updates at a specified interval..

> --

> Sincerely,
> Todd B - Agendum Software

> AgTransform - Major Update!! Now has 'true' translucency!  Create forms,
> dialogs and more with 'see through' screens! All using point and click
> functionality - NO Code!



> > My application binds controls (text boxes, etc.) to ADO data controls,
> > whose Recordset property is set in code to an ADO Recordset object.

> > This works fine.

> > However my problem is this: if the user changes a text box and then
> > clicks on a button that is OFF the current form, in particular on a
> > toolbar on an MDI form, the change to the text box is not "committed" at
> > that time, like it would be if the user forst clicked on some other
> > control on the current form.

> > So I can't for example implement a "Save" on the toolbar.

> > Can anyone explain how I can do this? Any help much appreciated.

> > -- BobC



Sat, 04 Jan 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. ADO Data Control and Bound Controls

2. Data-bound Masked Edit makes all data-bound controls not display data

3. Bind an ado recordset directly to an ado data control (adodc)

4. First Cell Empty in Data Grid bound to ADO Data Control

5. Data-Bound Vs. Non-Data-Bound Controls

6. Data-Bound Vs. Non-Data-Bound Controls

7. Data-Bound Vs. Non-Data-Bound Controls

8. Creating ADO Data Bound ActiveX Controls

9. updating data with ADO bound controls

10. Ado, Data Environment and Bound Controls

11. Need help binding to an ADO data control

12. Deploying ADO Data bound controls / changing connection string

 

 
Powered by phpBB® Forum Software