This is my Technical area of troubleshooting and learning new Programming skills and many more. Here you will find answers for many new technologies like asp.net 2.0/3.5,4.0 C# access, mysql, Amazon Webservice ,Sql-server, JD Edwards, SAS, Salesforce, APIs, MVC and many more. please visit & discuss.
Monday, August 17, 2020
Recordset RecordCount VBA C# .net
Sometime we have to count record set and take decision wheather to show result in excel or not. If count is too much excel can crash. for that people are running same query two times, one time count and another time display record. In order to avoid this run query onece and take decision. like following:-
If Recordset.RecordCount > 20000 Then
Response = MsgBox(WorksheetFunction.text(Recordset.RecordCount, "_(* #,##0_);_(* (#,##0);_(* ""-""??_);_(@_)") & "Records......Continue?", vbYesNo)
If Response = vbNo Then GoTo CleanUp_Exit
End If
https://docs.microsoft.com/en-us/office/client-developer/access/desktop-database-reference/recordset-recordcount-property-dao
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment