ADO Requery disables text boxes 
Author Message
 ADO Requery disables text boxes

Using VB 6 Professional, and ADO 2.0.

Have a command object (read only, client-side, static), based on a SQL
statement involving a simple join of 2 tables.

The form has some text boxes bound to fields of the result set, and
command buttons to go to next and previous records of the result set.

Prior to doing a requery everything works fine.  If I do a requery, the
text boxes are frozen on the record prior to the requery.  The command
buttons still work, however.  I can tell the command buttons still work
by BOF and EOF beeps, and by checking the AbsolutePosition Property in
debug mode.

Additional info:

In debug, I verified that the text box properties DataField and
DataMember were preserved after the requery.  For some reason, I got an
error when trying to see the DataSource property (either before or after
requery).

Appreciate any help:

Especially on text box freezing
Problem seeing DataSource when Printing in immediate window,

Thanks very much,

John Fields



Thu, 28 Feb 2002 03:00:00 GMT  
 ADO Requery disables text boxes
Before doing the requery, I can move around the record set using recordset
methods and the text boxes will change contents according to the specific record
in the recordset.  After doing the requery, the text boxes are frozen on the
last record prior to the requery.  The text boxes still have the DataField and
DataMember properties set. (The record moving methods still work, however.)

I did notice though later that if I unload and reactivate the form, the text
boxes will work again - so there is some connection lost by doing a requery that
is reestablished when the form reactivates.  Not sure what is going on.

Thanks for your help.

John

Quote:

> I think i get what you are saying

> when you move around the recordset you need to re assign teh contents of the
> Dataset to the controls on the form or else nothing will be displayed in the
> controls on the form.

> --
> ------------
> Smorf

> Some say "Only stupid people ask Stupid Questions"
> But others say "Stupid people answer Stupid Questions"


> >Using VB 6 Professional, and ADO 2.0.

> >Have a command object (read only, client-side, static), based on a SQL
> >statement involving a simple join of 2 tables.

> >The form has some text boxes bound to fields of the result set, and
> >command buttons to go to next and previous records of the result set.

> >Prior to doing a requery everything works fine.  If I do a requery, the
> >text boxes are frozen on the record prior to the requery.  The command
> >buttons still work, however.  I can tell the command buttons still work
> >by BOF and EOF beeps, and by checking the AbsolutePosition Property in
> >debug mode.

> >Additional info:

> >In debug, I verified that the text box properties DataField and
> >DataMember were preserved after the requery.  For some reason, I got an
> >error when trying to see the DataSource property (either before or after
> >requery).

> >Appreciate any help:

> >Especially on text box freezing
> >Problem seeing DataSource when Printing in immediate window,

> >Thanks very much,

> >John Fields



Thu, 28 Feb 2002 03:00:00 GMT  
 ADO Requery disables text boxes
I think i get what you are saying

when you move around the recordset you need to re assign teh contents of the
Dataset to the controls on the form or else nothing will be displayed in the
controls on the form.

--
------------
Smorf

Some say "Only stupid people ask Stupid Questions"
But others say "Stupid people answer Stupid Questions"

Quote:

>Using VB 6 Professional, and ADO 2.0.

>Have a command object (read only, client-side, static), based on a SQL
>statement involving a simple join of 2 tables.

>The form has some text boxes bound to fields of the result set, and
>command buttons to go to next and previous records of the result set.

>Prior to doing a requery everything works fine.  If I do a requery, the
>text boxes are frozen on the record prior to the requery.  The command
>buttons still work, however.  I can tell the command buttons still work
>by BOF and EOF beeps, and by checking the AbsolutePosition Property in
>debug mode.

>Additional info:

>In debug, I verified that the text box properties DataField and
>DataMember were preserved after the requery.  For some reason, I got an
>error when trying to see the DataSource property (either before or after
>requery).

>Appreciate any help:

>Especially on text box freezing
>Problem seeing DataSource when Printing in immediate window,

>Thanks very much,

>John Fields



Fri, 01 Mar 2002 03:00:00 GMT  
 ADO Requery disables text boxes
I think you may need to rebind the data fields.


Quote:
> Before doing the requery, I can move around the record set using recordset
> methods and the text boxes will change contents according to the specific
record
> in the recordset.  After doing the requery, the text boxes are frozen on
the
> last record prior to the requery.  The text boxes still have the DataField
and
> DataMember properties set. (The record moving methods still work,
however.)

> I did notice though later that if I unload and reactivate the form, the
text
> boxes will work again - so there is some connection lost by doing a
requery that
> is reestablished when the form reactivates.  Not sure what is going on.

> Thanks for your help.

> John


> > I think i get what you are saying

> > when you move around the recordset you need to re assign teh contents of
the
> > Dataset to the controls on the form or else nothing will be displayed in
the
> > controls on the form.

> > --
> > ------------
> > Smorf

> > Some say "Only stupid people ask Stupid Questions"
> > But others say "Stupid people answer Stupid Questions"


> > >Using VB 6 Professional, and ADO 2.0.

> > >Have a command object (read only, client-side, static), based on a SQL
> > >statement involving a simple join of 2 tables.

> > >The form has some text boxes bound to fields of the result set, and
> > >command buttons to go to next and previous records of the result set.

> > >Prior to doing a requery everything works fine.  If I do a requery, the
> > >text boxes are frozen on the record prior to the requery.  The command
> > >buttons still work, however.  I can tell the command buttons still work
> > >by BOF and EOF beeps, and by checking the AbsolutePosition Property in
> > >debug mode.

> > >Additional info:

> > >In debug, I verified that the text box properties DataField and
> > >DataMember were preserved after the requery.  For some reason, I got an
> > >error when trying to see the DataSource property (either before or
after
> > >requery).

> > >Appreciate any help:

> > >Especially on text box freezing
> > >Problem seeing DataSource when Printing in immediate window,

> > >Thanks very much,

> > >John Fields



Sat, 02 Mar 2002 03:00:00 GMT  
 ADO Requery disables text boxes

says...
Quote:
> Before doing the requery, I can move around the record set using recordset
> methods and the text boxes will change contents according to the specific record
> in the recordset.  After doing the requery, the text boxes are frozen on the
> last record prior to the requery.  The text boxes still have the DataField and
> DataMember properties set. (The record moving methods still work, however.)

> I did notice though later that if I unload and reactivate the form, the text
> boxes will work again - so there is some connection lost by doing a requery that
> is reestablished when the form reactivates.  Not sure what is going on.

> Thanks for your help.

> John


> > I think i get what you are saying

> > when you move around the recordset you need to re assign teh contents of the
> > Dataset to the controls on the form or else nothing will be displayed in the
> > controls on the form.

> > --
> > ------------
> > Smorf

> > Some say "Only stupid people ask Stupid Questions"
> > But others say "Stupid people answer Stupid Questions"


> > >Using VB 6 Professional, and ADO 2.0.

> > >Have a command object (read only, client-side, static), based on a SQL
> > >statement involving a simple join of 2 tables.

> > >The form has some text boxes bound to fields of the result set, and
> > >command buttons to go to next and previous records of the result set.

> > >Prior to doing a requery everything works fine.  If I do a requery, the
> > >text boxes are frozen on the record prior to the requery.  The command
> > >buttons still work, however.  I can tell the command buttons still work
> > >by BOF and EOF beeps, and by checking the AbsolutePosition Property in
> > >debug mode.

> > >Additional info:

> > >In debug, I verified that the text box properties DataField and
> > >DataMember were preserved after the requery.  For some reason, I got an
> > >error when trying to see the DataSource property (either before or after

Have you tried doing a refresh for each of the textboxes??  Maybe the
binding just needs a nudge...

Mike Mattix



Sun, 03 Mar 2002 03:00:00 GMT  
 ADO Requery disables text boxes
I will try the refresh.  If I do an unload and reactivate of the form, things will be
ok, but that can be inconvenient.

Thanks,

John

Quote:


> says...
> > Before doing the requery, I can move around the record set using recordset
> > methods and the text boxes will change contents according to the specific record
> > in the recordset.  After doing the requery, the text boxes are frozen on the
> > last record prior to the requery.  The text boxes still have the DataField and
> > DataMember properties set. (The record moving methods still work, however.)

> > I did notice though later that if I unload and reactivate the form, the text
> > boxes will work again - so there is some connection lost by doing a requery that
> > is reestablished when the form reactivates.  Not sure what is going on.

> > Thanks for your help.

> > John


> > > I think i get what you are saying

> > > when you move around the recordset you need to re assign teh contents of the
> > > Dataset to the controls on the form or else nothing will be displayed in the
> > > controls on the form.

> > > --
> > > ------------
> > > Smorf

> > > Some say "Only stupid people ask Stupid Questions"
> > > But others say "Stupid people answer Stupid Questions"


> > > >Using VB 6 Professional, and ADO 2.0.

> > > >Have a command object (read only, client-side, static), based on a SQL
> > > >statement involving a simple join of 2 tables.

> > > >The form has some text boxes bound to fields of the result set, and
> > > >command buttons to go to next and previous records of the result set.

> > > >Prior to doing a requery everything works fine.  If I do a requery, the
> > > >text boxes are frozen on the record prior to the requery.  The command
> > > >buttons still work, however.  I can tell the command buttons still work
> > > >by BOF and EOF beeps, and by checking the AbsolutePosition Property in
> > > >debug mode.

> > > >Additional info:

> > > >In debug, I verified that the text box properties DataField and
> > > >DataMember were preserved after the requery.  For some reason, I got an
> > > >error when trying to see the DataSource property (either before or after
> Have you tried doing a refresh for each of the textboxes??  Maybe the
> binding just needs a nudge...

> Mike Mattix




Sun, 03 Mar 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. ADO Requery disables text boxes

2. Requery text box

3. Selecting text in disabled text boxes...

4. Dim text in disabled text boxes

5. dark text in disabled text box

6. Text in disabled text boxes

7. Dimmed text in disabled text box

8. Text Box Disable text

9. ADO List box and Text boxes

10. Text box text on new page text box

11. Problems Disabling/Enabling Unbound Text Boxes

12. HowTo disable text box validation

 

 
Powered by phpBB® Forum Software