Seite 1 von 1

[BASE] transfer field content (different subforms)

Verfasst: So, 14.01.2007 02:23
von Far
Sorry if I write in english, but I'm pretty desperate and I don't speak german

:D

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 )
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)?


Bild

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

Verfasst: So, 14.01.2007 20:27
von Far
problem solved...just use parent.parent to navigate subofrms