david7777777777
Programmer
I have an ASP page with a listbox, 2 recordsets, a button, and a grid.
rsLocations
rsShipments
lstDestination
btnGo
The page allows users to select a location/destination and use their selection from the lstDestination drop-down box as the search criteria for the rsShipments recordset, which returns all shipments shipped to that destination.
When the page first loads, all that is visible is the drop-down box and the btnGo button. Once they select a destination from the drop-down box, they click the Go button, which displays the appropriate records in the grid.
If the rsShipments recordset returns no records, I have a little message displaying telling the user to click the hyperlink in another frame to the left. This reloads the page from scratch.
What I want to do is eliminate that step for the user and have the page automatically reload if the recordset returns no records, along with the message "No records found, try again."
Here is the code if the recordset is empty:
Sub rsShipments_ondatasetchanged()
if rsShipments.BOF and rsShipments.EOF then
response.write "<P><br> <font color=red><b>No shipments found.</font></b></P>"
end if
End Sub
Thanks for your help.
rsLocations
rsShipments
lstDestination
btnGo
The page allows users to select a location/destination and use their selection from the lstDestination drop-down box as the search criteria for the rsShipments recordset, which returns all shipments shipped to that destination.
When the page first loads, all that is visible is the drop-down box and the btnGo button. Once they select a destination from the drop-down box, they click the Go button, which displays the appropriate records in the grid.
If the rsShipments recordset returns no records, I have a little message displaying telling the user to click the hyperlink in another frame to the left. This reloads the page from scratch.
What I want to do is eliminate that step for the user and have the page automatically reload if the recordset returns no records, along with the message "No records found, try again."
Here is the code if the recordset is empty:
Sub rsShipments_ondatasetchanged()
if rsShipments.BOF and rsShipments.EOF then
response.write "<P><br> <font color=red><b>No shipments found.</font></b></P>"
end if
End Sub
Thanks for your help.