Two databases Oldnames and Newnames.
I have a table with two columns. What I want to do is to scroll down the list and if I press F1 I want the data in column 1 to be copied to column 2. i.e. the name in Oldnames to be Newnames
....
oColumn := TBColumnNew("Old Name", FieldWBlock("NAME", 2)
OBrowse:AddColumn(oColumn)oColumn := TBColumnNew("Old Name", FieldWBlock("NAME", 1)
OBrowse:AddColumn(oColumn)
Do while lCont
do while .not. OBrowse:stable .and. (nKey := InKey()) == 0
oBrowse:Stabilize()
enddo
..... etc.
Now the bit where you check for keypresses:
Case nKey == K_F1
What do I put here?
I've tried Newnames->NAME := Oldnames->NAME but that doesn't work.
What should happen is that the corresponding record in Newnames should be replaced with the corresponding record in Oldnames, and the display should update to show both columns with the same (oldname).
I have a table with two columns. What I want to do is to scroll down the list and if I press F1 I want the data in column 1 to be copied to column 2. i.e. the name in Oldnames to be Newnames
....
oColumn := TBColumnNew("Old Name", FieldWBlock("NAME", 2)
OBrowse:AddColumn(oColumn)oColumn := TBColumnNew("Old Name", FieldWBlock("NAME", 1)
OBrowse:AddColumn(oColumn)
Do while lCont
do while .not. OBrowse:stable .and. (nKey := InKey()) == 0
oBrowse:Stabilize()
enddo
..... etc.
Now the bit where you check for keypresses:
Case nKey == K_F1
What do I put here?
I've tried Newnames->NAME := Oldnames->NAME but that doesn't work.
What should happen is that the corresponding record in Newnames should be replaced with the corresponding record in Oldnames, and the display should update to show both columns with the same (oldname).