I
ian
Hi guys, i've got an aqward problem
I have made a form with 7 fields
Type
Code check
Description
Retail
Trade
In warehouse
Sold and undelivered
and below that i have a search box. What i want to do is to be able to type
any information into the search box, either a code, a bit of a description,
maybe even a price, and it will show the information i need in the boxes.
I have made some code for the search button, but i don't want it to make a
preview, which is what its doing, and anyway, it doesnt work, because the
preview is empty
Private Sub Searchclick_Click()
On Error GoTo Err_Searchclick_Click
If IsNull(Me!Search) Then
MsgBox "A valid code must " & _
"be entered.", _
vbExclamation, "Valid code needed"
Else
Me!Search.SetFocus
stTableName = "Stock3"
DoCmd.OpenTable stTableName, acPreview, strSearchtable
End If
Exit_Searchclick_Click:
Exit Sub
Err_Searchclick_Click:
MsgBox Err.Description
Resume Exit_Searchclick_Click
End Sub
Hope you guys understand what i need!
Many many thanks,
Ian.
I have made a form with 7 fields
Type
Code check
Description
Retail
Trade
In warehouse
Sold and undelivered
and below that i have a search box. What i want to do is to be able to type
any information into the search box, either a code, a bit of a description,
maybe even a price, and it will show the information i need in the boxes.
I have made some code for the search button, but i don't want it to make a
preview, which is what its doing, and anyway, it doesnt work, because the
preview is empty
Private Sub Searchclick_Click()
On Error GoTo Err_Searchclick_Click
If IsNull(Me!Search) Then
MsgBox "A valid code must " & _
"be entered.", _
vbExclamation, "Valid code needed"
Else
Me!Search.SetFocus
stTableName = "Stock3"
DoCmd.OpenTable stTableName, acPreview, strSearchtable
End If
Exit_Searchclick_Click:
Exit Sub
Err_Searchclick_Click:
MsgBox Err.Description
Resume Exit_Searchclick_Click
End Sub
Hope you guys understand what i need!
Many many thanks,
Ian.