Synchronize Subform Textbox

alanij

Registered User.
Local time
Today, 06:10
Joined
Nov 20, 2008
Messages
12
Hi

Does anyone know how to create a textbox a second subform that replicates a textbox that is entered in my 1st subform?

I have a date in my first subform [Alert Details Subform] that has a one to many relationship with my second subform [Meeting Details Subform] and i would like the date that is entered in my first subform to be shown in my second subform without the need to re-enter it manually.

Hope that makes sense

cheers
 
Not exactly sure if this will do the trick for you, but in the code below, frmMain contains frmDateOne and frmDateTwo as subform

Add the BeforeUpdate or AfterUpdate event to frmDateOne.txtDateOne

Code:
Private Sub txtDateOne_AfterUpdate()
    Form_frmDateTwo.txtDateTwo = Me.txtDateOne
End Sub

Private Sub txtDateOne_BeforeUpdate(Cancel As Integer)
    Form_frmDateTwo.txtDateTwo = Me.txtDateOne
End Sub

txtDateTwo will get txtDateOne's value after the field lost focus, enter, etc.
 

Users who are viewing this thread

Back
Top Bottom