help!? trail report
Tom,
As it happens it didnt take me that long, I simply used the
selection.autofilter with the criteria as the textbox name and it shows
the results in the background. after a message box ok to say done it
removes the autofilter. (ill post the code i used)
Private Sub Report_Click()
If regTrail <= "" Then
MsgBox "must input a registration number!"
Exit Sub
End If
Range("A1").End(xlDown).Offset(1, 0).Select
activecell.Select
Selection.AutoFilter
Selection.AutoFilter Field:=2, Criteria1:=regTrail.Value
Select Case MsgBox("finished?", vbOKOnly)
Case vbOK
Selection.AutoFilter
regTrail.Value = ""
regTrail.SetFocus
Exit Sub
End Select
End Sub
I know this is taking the easy way out but it appears to do what i
want, I just have to test it on other pc's with a smaller resolution to
ensure that the report can be viewed in the background, might have to
hide the form while its showing the results list as the message box
will have focus and therefore the form wont be able to be dragged out
of the way. I also might try adding a print option to print the results
out.
Many thanks again
Duncan
|