General information
Category:
Object Oriented Programming
Title:
Copying properties from one object to another ?
We need to make two objects the same as the other object. For example we have several column in a grid we want to programming assign all the properties of the first column to all the columns. (Of course except a few properties).
What we are actually trying accomplish is that we change the RecordSource of a grid to another view instead of the initial view (the fields are exactly same in both the views). When we do this we loose all the original properties (color, methods etc) of the grid but we see the data in the grid.
I tried assign the whole object to a variable and assign the object to a reference but it did not work. I get an error .
Here is the code:
Original View in the form:
SELECT firstname,lastname FROM main into cursor mainyearly
When changing views:
loColumn = thisform.myggrid.colmn1
SELECT firstname,lastname FROM notinmain into cursor mainyearly
thisform.grdDataEntry.RecordSource = "mainyearly"
thisform.grdDataEntry.column1=loColumn
thisform.refresh
Any suggestions would be really appreciated.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only