J
Jon
Greeting,
I have a form using as search form. In this form there is a txt box for
input a data(Numbers) and there is cmd button for open other form the display
result. I have made this code put does not work:
Private Sub Command66_Click()
On Error GoTo Err_Command66_Click
Dim stDocName As String
Dim stLinkCriteria As String
If Me.Text64 <> "[CONTRACT NO]=" = True Then
MsgBox "No Contract No. Found. Please input valid No.", vbCritical,
"No Data Found..."
Me.Text64.SetFocus
ElseIf Len(Me.Text64 & "") > 0 = True Then
stDocName = "Dispaly sorted reprot by Contract NO"
stLinkCriteria = "[CONTRACT NO]=" & Me![Text64]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox "You Must Input a Contract No. First.", vbCritical, "No
Processor Selected..."
Me.Text64.SetFocus
End If
Exit Sub
Exit_Command66_Click:
Exit Sub
Err_Command66_Click:
MsgBox Err.Description
Resume Exit_Command66_Click
End Sub
- the text64 is for inputting a data(numbers)
- [contract No] is a filed in tbl called “ Contractorâ€
what I want to do is as follows:
-checking the text64 value if it empty, If true msgbox appears and request
inputting numbers as a bove
-checking the text64 value if it is not matching the data in the tbl. If
true , msgbox appears and telling that no record was found.
Any help plzzzz
I have a form using as search form. In this form there is a txt box for
input a data(Numbers) and there is cmd button for open other form the display
result. I have made this code put does not work:
Private Sub Command66_Click()
On Error GoTo Err_Command66_Click
Dim stDocName As String
Dim stLinkCriteria As String
If Me.Text64 <> "[CONTRACT NO]=" = True Then
MsgBox "No Contract No. Found. Please input valid No.", vbCritical,
"No Data Found..."
Me.Text64.SetFocus
ElseIf Len(Me.Text64 & "") > 0 = True Then
stDocName = "Dispaly sorted reprot by Contract NO"
stLinkCriteria = "[CONTRACT NO]=" & Me![Text64]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox "You Must Input a Contract No. First.", vbCritical, "No
Processor Selected..."
Me.Text64.SetFocus
End If
Exit Sub
Exit_Command66_Click:
Exit Sub
Err_Command66_Click:
MsgBox Err.Description
Resume Exit_Command66_Click
End Sub
- the text64 is for inputting a data(numbers)
- [contract No] is a filed in tbl called “ Contractorâ€
what I want to do is as follows:
-checking the text64 value if it empty, If true msgbox appears and request
inputting numbers as a bove
-checking the text64 value if it is not matching the data in the tbl. If
true , msgbox appears and telling that no record was found.
Any help plzzzz