[BASE] transfer field content (different subforms)
Verfasst: So, 14.01.2007 02:23
Sorry if I write in english, but I'm pretty desperate and I don't speak german
How to trasfer the content of one field to another field by pressing a button?
Fo example: I have two txtfields Called "Source" and "Destination" . By pressing button "TRANSFER" the data content of "Source" moves in "Destination" (overwriting "Destination "data if present)
When the fields are part of the same SubForm,The following sub works... BUT
what if Source and Destination are respectively associated to different subforms(see image below)???What if there are more than two fields (for example 5 sources and respectively 5 destinations)?

in other words: how do I navigate (or switch) between forms and subforms using oEv.Source or other commands?????
Thank you, and sorry for my english...
problem solved...just use parent.parent to navigate subofrms

How to trasfer the content of one field to another field by pressing a button?
Fo example: I have two txtfields Called "Source" and "Destination" . By pressing button "TRANSFER" the data content of "Source" moves in "Destination" (overwriting "Destination "data if present)
When the fields are part of the same SubForm,The following sub works... BUT
Code: Alles auswählen
sub copy data ( oEv as Object )
dim dbFrm as object
dbFrm = oEv.Source.Model.parent
if not isNull( dbFrm.Destination.BoundField ) then
dbFrm.Destination.BoundField.updateString( _
dbFrm.Source.CurrentValue )

in other words: how do I navigate (or switch) between forms and subforms using oEv.Source or other commands?????
Thank you, and sorry for my english...
problem solved...just use parent.parent to navigate subofrms