Sub Command1_Click()
Call ButtonClicked(1)
End Sub
Sub Command2_Click()
Call ButtonClicked(2)
End Sub
Sub Command2_Click()
Call ButtonClicked(3)
End Sub
Private Sub ButtonClicked(iButton As Integer)
' ... update table field with iButton value
End Sub
[COLOR=black][FONT=Times New Roman][SIZE=3][FONT=Times New Roman] [/FONT][/SIZE][/FONT][/COLOR][COLOR=black][FONT=Times New Roman][SIZE=3][FONT=Times New Roman]Private Sub GOOD_Click()
If Not IsNull(Me.SN.Value) Then
LastPosSN = Me.SN.Value
End If
If PosPullTestCount = Me.PullTestNum.Value Then
MsgBox "Time to perform a pull-test on a scrap cell!"
PosPullTestCount = 1
Me.Text30.Value = Me.PullTestNum.Value
DoCmd.OpenForm "GeneralTabPullTest"
Else
PosPullTestCount = PosPullTestCount + 1
Me.Text30.Value = Me.PullTestNum.Value
End If[/FONT][/SIZE][/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][SIZE=3][FONT=Times New Roman]DoCmd.GoToRecord , , acNewRec
Me.CreationDate = Now()
Forms!GeneralTabPullTest!LotNumber = Me.LotNumber[/FONT][/SIZE][/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][SIZE=3][FONT=Times New Roman]End Sub[/FONT][/SIZE][/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][SIZE=3][FONT=Times New Roman]POP Button[/FONT][/SIZE][/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][FONT=Times New Roman][SIZE=3]Private Sub POP_Click()
DoCmd.OpenForm "POPResults"
End Sub[/SIZE][/FONT][/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][SIZE=3][FONT=Times New Roman]Private Sub Other_Click()
DoCmd.OpenForm "OtherComments"
DoCmd.GoToRecord , , acNewRec
Me.CreationDate = Now()[/FONT][/SIZE][/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][SIZE=3][FONT=Times New Roman]End Sub[/FONT][/SIZE][/FONT][/COLOR]
Private Sub Good_Click()
... your code ...
Call ButtonClicked("Good")
End Sub
Private Sub Pop_Click()
... your code ...
Call ButtonClicked("Pop")
End Sub
Private Sub _Click()
... your code ...
Call ButtonClicked("Other")
End Sub
Private Sub ButtonClicked(strButton As String)
formfield.Value = strButton
End Sub
[COLOR=black][FONT=Times New Roman][SIZE=3][FONT=Times New Roman]Private Sub GOOD_Click()
DoCmd.RunCommand acCmdSaveRecord[/FONT][/SIZE][/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][SIZE=3][FONT=Times New Roman]If Not IsNull(Me.SN.Value) Then
LastPosSN = Me.SN.Value
End If
If PosPullTestCount = Me.PullTestNum.Value Then
MsgBox "Time to perform a pull-test on a scrap cell!"
PosPullTestCount = 1
Me.Text30.Value = Me.PullTestNum.Value
DoCmd.OpenForm "GeneralTabPullTest"
DoCmd.GoToRecord , , acNewRec
Me.CreationDate = Now()
Forms!GeneralTabPullTest!LotNumber = Me.LotNumber[/FONT][/SIZE][/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman]Else
PosPullTestCount = PosPullTestCount + 1
Me.Text30.Value = Me.PullTestNum.Value
End If
Call ButtonClicked("Good")
End Sub
Private Sub ButtonClicked(strButton As String)
Formfield.Value = "GOOD"
End Sub[/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][SIZE=3][FONT=Times New Roman]Private Sub POP_Click()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenForm "POPResults"[/FONT][/SIZE][/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][FONT=Times New Roman][SIZE=3]Call ButtonClicked("POP")
End Sub
[/SIZE][/FONT][/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][FONT=Times New Roman][SIZE=3][/SIZE][/FONT][/FONT][/COLOR]
[COLOR=black][FONT=Times New Roman][FONT=Times New Roman][SIZE=3]Private Sub ButtonClicked(strButton As String)
Me.Text52.Value = "POP"
End Sub[/SIZE][/FONT]
[/FONT][/COLOR]
Private Sub Command57_Click()
DoCmd.RunCommand acCmdSaveRecord
If Not IsNull(Me.SN.Value) Then
LastPosSN = Me.SN.Value
End If
If PosPullTestCount = Me.PullTestNum.Value Then
MsgBox "Time to perform a pull-test on a scrap cell!"
PosPullTestCount = 1
Me.Text30.Value = Me.PullTestNum.Value
DoCmd.OpenForm "GeneralTabPullTest"
DoCmd.GoToRecord , , acNewRec
Forms!GeneralTabPullTest!LotNumber = Me.LotNumber
Forms!GeneralTabPullTest!CreationDate = Now()
Else
PosPullTestCount = PosPullTestCount + 1
Me.Text30.Value = Me.PullTestNum.Value
End If
Call ButtonClicked("Good")
End Sub
Private Sub POP_Click()
DoCmd.RunCommand acCmdSaveRecord
MsgBox "Clean Electrodes NOW"
If Not IsNull(Me.SN.Value) Then
LastPosSN = Me.SN.Value
End If
If PosPullTestCount = Me.PullTestNum.Value Then
MsgBox "Time to perform a pull-test on a scrap cell!"
PosPullTestCount = 1
Me.Text30.Value = Me.PullTestNum.Value
DoCmd.OpenForm "GeneralTabPullTest"
DoCmd.GoToRecord , , acNewRec
Forms!GeneralTabPullTest!LotNumber = Me.LotNumber
Forms!GeneralTabPullTest!CreationDate = Now()
Else
PosPullTestCount = PosPullTestCount + 1
Me.Text30.Value = Me.PullTestNum.Value
End If
Call ButtonClicked("POP")
End Sub
Private Sub Other_Click()
DoCmd.OpenForm "OtherComments"
DoCmd.GoToRecord , , acNewRec
Me.CreationDate = Now()
Call ButtonClicked("Other")
End Sub
Private Sub Text55_Click()
Private Sub ButtonClicked(strButton As String)
Me.Text55.Value = strButton
End Sub