L
LouisPat
Hi!
I want to create a form with a text box that asks the user a number. When
the user enters the number and click on a preview button, it will open a
report and filter data (static pressure of hydrants < 75, for example) from a
table. I don't want the the text box to appear in pop up (input box). I want
it to appear directly on the form if it is possible, as I have other criteria
to look for in my form
This is the code I designed but it obviously don't work. Can someone help
me? I work in Access 2000
Thanks
Louis Pat
CODE:
Sub PrintReports(Printmode As Integer)
Dim TheNumber As Integer
On Error GoTo Err_Preview_Click
Me!Number.SetFocus
' Number is the name of the textbox
TheNumber = Me!Number.Text
DoCmd.OpenReport "hydrant report", Printmode, , "[Static
Pressure] < TheNumber "
Exit_Preview_Click:
Exit Sub
Err_Preview_Click:
Resume Exit_Preview_Click
End Sub
I want to create a form with a text box that asks the user a number. When
the user enters the number and click on a preview button, it will open a
report and filter data (static pressure of hydrants < 75, for example) from a
table. I don't want the the text box to appear in pop up (input box). I want
it to appear directly on the form if it is possible, as I have other criteria
to look for in my form
This is the code I designed but it obviously don't work. Can someone help
me? I work in Access 2000
Thanks
Louis Pat
CODE:
Sub PrintReports(Printmode As Integer)
Dim TheNumber As Integer
On Error GoTo Err_Preview_Click
Me!Number.SetFocus
' Number is the name of the textbox
TheNumber = Me!Number.Text
DoCmd.OpenReport "hydrant report", Printmode, , "[Static
Pressure] < TheNumber "
Exit_Preview_Click:
Exit Sub
Err_Preview_Click:
Resume Exit_Preview_Click
End Sub