Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh a Grid

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
0
0
US
I am using a datagrid to view records with a certain status. On my form a have a "Refresh Grid" button that I want to grb new records into the grid.
My problem is, that if there are no records to be pulled into the grid, I get an error because the grids datasource cannot be set causing mt SQL statement to fail. how can I get around this?
I tryed saying

if rsGrid.Recordcount = "0" then
msgbox"blaaa"
exit sub
end if

but that doesnt work since my sql statement is the first thing that gets fired off.


any help would be appreciated

Thanks


 
Looks like an error trap would be your best solution.

Hope this helps,
Ralph
 
Well, error-trapping in this case should be your last resort. Maybe there are conflicts within. It will be helpful if you could just post the procedure that raised the error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top