S
shelly2 via AccessMonster.com
I have the following code that runs when you click a command button. I have
further code that is supposed to run when the open event for the "Allocate"
form opens. For some reason, that code is not triggered. Any ideas?
Thank you kindly for your time.
This code is contained in a form called "Punch"
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Private Sub cmdAllocate_Click()
Me.txtTimeToday.SetFocus
IftxtTimeToday.Text = "" Then
DoCmd.GoToReord , "Punch", acPrevious, 1
Calculate
End If
DoCmd.OpenForm "Allocate Form"
DoCmd.Close acForm, "Punch"
End Sub
*~*~*~*~*~*
This is the code that's supposed to run at the open event of the "Allocate
Form":
Private Sub Form_Open()
Dim init As String
Me.txtTotalTime.SetFocus
Me.txtTotalTime.Text = Forms![Punch].txtTimeToday.Text
Me.Text4.SetFocus
Me.Text4.Text = Date
Forms![Punch].txtInitials.Text
Me.MasterInit.SetFocus
Me.MasterInit.Text = init
End Sub
further code that is supposed to run when the open event for the "Allocate"
form opens. For some reason, that code is not triggered. Any ideas?
Thank you kindly for your time.
This code is contained in a form called "Punch"
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Private Sub cmdAllocate_Click()
Me.txtTimeToday.SetFocus
IftxtTimeToday.Text = "" Then
DoCmd.GoToReord , "Punch", acPrevious, 1
Calculate
End If
DoCmd.OpenForm "Allocate Form"
DoCmd.Close acForm, "Punch"
End Sub
*~*~*~*~*~*
This is the code that's supposed to run at the open event of the "Allocate
Form":
Private Sub Form_Open()
Dim init As String
Me.txtTotalTime.SetFocus
Me.txtTotalTime.Text = Forms![Punch].txtTimeToday.Text
Me.Text4.SetFocus
Me.Text4.Text = Date
Forms![Punch].txtInitials.Text
Me.MasterInit.SetFocus
Me.MasterInit.Text = init
End Sub