Jim,
Are you entering data in your Column1.text1 textbox? Or changing data? You may not be on the correct record of your free table to be getting the correct data. Walk through this with the debugger, checking for record numbers, data values, etc.
Barbara
>Hello All,
>
>I'm trying to use a grid to update the values of textboxes on a form.
>
>This code is in a form method which is in the click event of stgrid1.column1.text1;
>
>thisform.setall("visible", .t.,"sttextbox")
>thisform.setall("visible", .t.,"stlabel")
>store ThisForm.Stgrid1.Column1.Text1.value to ThisForm.Sttxthipno.value
>store ThisForm.Stgrid1.Column2.Text1.value to ThisForm.Sttxtname.value
>store thisForm.Stgrid1.Column3.Text1.value to ThisForm.Sttxtacct.value
>store ThisForm.Stgrid1.Column4.Text1.value to ThisForm.Sttxtamtbid.value
>store ThisForm.Stgrid1.Column5.Text1.value to ThisForm.Sttxtamtpaid.value
>store ThisForm.Stgrid1.Column7.Text1.value to ThisForm.Sttxttype.value
>mamtdue = stntrans.amount - stntrans.amtpaid
>mbilldate = stntrans.billdate
>select stnbuyer
>seek thisForm.Stgrid1.Column3.Text1.value
>if fname <> " "
>mlname = trim(fname) + " " + trim(lname)
>else
>mlname = trim(lname)
>endif
>maddress = trim(city) + ', ' + trim(state) + ' ' + country
>mldate = ThisForm.Sttxtmldate.value
>mlastbilldate = ThisForm.Sttxtmlastbilldate.value
>mcnt = mldate - mlastbilldate
>mtot = (mamtdue * .0005) * mcnt
>thisform.refresh
>
>When the user clicks the textbox in the grid, only the textbox on the form that corresponds with the grid has it's value updated. All the others remain stagnant.
>
>I've tried moving the method to the afterrowcolchange event to no avail.
>
>The grid's source if a free table, while the textboxes have no control source.
>
>Any ideas appreciated.
>
>Jim Harvey
>
jharvey@netrax.net