fields carried to wrong records

fields carried to wrong records

Post by David G. McDivit » Thu, 27 Jan 2000 04:00:00



I have an DBGrid bound to a Data Control, along with several TextBoxes
bound to the same Data Control. I use the DBGrid as a list box, with the
record selectors disabled. A person select whatever record by clicking
on rows in the DBGrid.

My problem is that a field value in one record may get written into
other records by mistake, screwing them up. I could solve this by using
unbound TextBoxes, a recordset object, and seek instructions, then
stuffing their values by using the Data Control's Reposition event. I
then have to monkey with LostFocus and DataChanged properties on the
TextBoxes, which is a pain.

I think because I have two controls bound to each field it gets out of
sync, though editing in the DBGrid is disabled. Is having my TextBoxes
unbound the only alternative? Has anyone experienced similar problems?

This is a VB 5.0 app. I had a similar problem with Access, and mostly
use unbound TextBoxes with Access as a result. Unbound controls are much
easier to manage in Access however. Thanks

--

http://www.members.tripod.com/dmcdivitt
http://www.geocities.com/dmcdivitt

 
 
 

fields carried to wrong records

Post by David G. McDivit » Thu, 27 Jan 2000 04:00:00


Sorry about the repeated posts. My newsgroup socket kept timing out.

--

http://www.members.tripod.com/dmcdivitt
http://www.geocities.com/dmcdivitt

 
 
 

fields carried to wrong records

Post by David G. McDivit » Fri, 28 Jan 2000 04:00:00


I have an DBGrid bound to a Data Control, along with several TextBoxes
bound to the same Data Control. I use the DBGrid as a list box, with the
record selectors disabled. A person select whatever record by clicking
on rows in the DBGrid.

My problem is that a field value in one record may get written into
other records by mistake, screwing them up. I could solve this by using
unbound TextBoxes, a recordset object, and seek instructions, then
stuffing their values by using the Data Control's Reposition event. I
then have to monkey with LostFocus and DataChanged properties on the
TextBoxes, which is a pain.

I think because I have two controls bound to each field it gets out of
sync, though editing in the DBGrid is disabled. Is having my TextBoxes
unbound the only alternative? Has anyone experienced similar problems?

This is a VB 5.0 app. I had a similar problem with Access, and mostly
use unbound TextBoxes with Access as a result. Unbound controls are much
easier to manage in Access however. Thanks

--

http://www.members.tripod.com/dmcdivitt
http://www.geocities.com/dmcdivitt

 
 
 

fields carried to wrong records

Post by David G. McDivit » Fri, 28 Jan 2000 04:00:00


I have an DBGrid bound to a Data Control, along with several TextBoxes
bound to the same Data Control. I use the DBGrid as a list box, with the
record selectors disabled. A person select whatever record by clicking
on rows in the DBGrid.

My problem is that a field value in one record may get written into
other records by mistake, screwing them up. I could solve this by using
unbound TextBoxes, a recordset object, and seek instructions, then
stuffing their values by using the Data Control's Reposition event. I
then have to monkey with LostFocus and DataChanged properties on the
TextBoxes, which is a pain.

I think because I have two controls bound to each field it gets out of
sync, though editing in the DBGrid is disabled. Is having my TextBoxes
unbound the only alternative? Has anyone experienced similar problems?

This is a VB 5.0 app. I had a similar problem with Access, and mostly
use unbound TextBoxes with Access as a result. Unbound controls are much
easier to manage in Access however. Thanks

--

http://www.members.tripod.com/dmcdivitt
http://www.geocities.com/dmcdivitt

 
 
 

fields carried to wrong records

Post by David G. McDivit » Sat, 29 Jan 2000 04:00:00


I was able to solve my problem, for those having interest. If the same
DataControl fields are bound to more than one control, a problem does
exist with synchronization of the controls. I solved this by setting the
DataChanged property to false for each of the controls, in the
Reposition event of the DataControl. The application now works
perfectly.

Microsoft seems to be stuck on those damned record selectors. People
make great use of them in Access, but their use does not represent a
sharp, custom application in my opinion. I think they are gaudy and
complicated. Users can make use of such applications only because they
are already accustomed to Access. VB can be allowed to have the same
focus, since the DataControl has record selectors, but an application
should be more refined in my opinion, if a person is able.

Quote:>I have an DBGrid bound to a Data Control, along with several TextBoxes
>bound to the same Data Control. I use the DBGrid as a list box, with the
>record selectors disabled. A person select whatever record by clicking
>on rows in the DBGrid.

>My problem is that a field value in one record may get written into
>other records by mistake, screwing them up. I could solve this by using
>unbound TextBoxes, a recordset object, and seek instructions, then
>stuffing their values by using the Data Control's Reposition event. I
>then have to monkey with LostFocus and DataChanged properties on the
>TextBoxes, which is a pain.

>I think because I have two controls bound to each field it gets out of
>sync, though editing in the DBGrid is disabled. Is having my TextBoxes
>unbound the only alternative? Has anyone experienced similar problems?

>This is a VB 5.0 app. I had a similar problem with Access, and mostly
>use unbound TextBoxes with Access as a result. Unbound controls are much
>easier to manage in Access however. Thanks

--

http://www.members.tripod.com/dmcdivitt
http://www.geocities.com/dmcdivitt
 
 
 

1. VFP 5 carrying field contents in a form to next record

Jeff:  Set Carry is one of the SET commands which is scoped to the active
datasession.  You will need to put the command into the form, probably in
the LOAD or INIT events.  If you are using a form template/class, you can
put the command there and it will be available in all forms.

Barbara
***************************

2. MSSQL7 Database

3. Making fields carry foward.

4. Getting Months even if not in Data

5. Can 4.5 Carry field info like Dbase?

6. SQL II

7. Carried forward on a calculated field in access help

8. RollBack vs. Commit

9. Carrying a field value to filter a report

10. Copying a record in a field to several records in same field

11. MoveLast finds wrong record

12. Preview Mode on Wrong Record

13. ODBC Outer Join Updates Wrong Record