|
原帖由 beaccesssuper 于 2008-5-30 09:26 发表
Private Sub cmdReport_Click()
Dim X As Form
Dim sql_RS As String
DoCmd.Hourglass True
Application.Echo False
DoCmd.SetWarnings False
Me.Requery
If Not IsNull(Val(Me!testbatchNo)) Then
Set X ...
Private Sub cmdReport_Click()
Dim X As Form
Dim sql_RS As String
DoCmd.Hourglass True
Application.Echo False
DoCmd.SetWarnings False
Me.Requery
If Not IsNull(Val(Me!testbatchNo)) Then
Set X = Forms![frmH-alpha_Test_Data].Form
DoCmd.OpenForm "frmH-alpha_Test_Data", , , , acFormEdit
Dim SomeValue
SomeValue = Val(Me!cboSample.Column(2))
X.RecordSource = "SELECT TempImport.[lamp-No], TempImport.testbatchNo, tblHalphatstedescription.serialNo " _
& " FROM tblHalphatstedescription INNER JOIN TempImport ON tblHalphatstedescription.serialNo = TempImport.testbatchNo" _
& " where testbatchNo = '" & SomeValue & "' ORDER BY TempImport.[lamp-No], TempImport.testbatchNo, TempImport.Meas_pos;"
else
MsgBox "Please select items you want to print out !", vbOKOnly, "Select prompt!"
End If
Exit_cmdReport_Click:
DoCmd.Hourglass False
Application.Echo True
DoCmd.SetWarnings True
Exit Sub
End Sub |
|