This is my technical area for troubleshooting and learning new programming skills and much more. Here, you will find answers on a wide range of technologies such as AI, Machine Learning, OpenAI, Databricks, ASP.NET, C#, Python, Microsoft Access, MySQL, Amazon Web Services, SQL Server, PL/SQL, JD Edwards, SAS, Salesforce, APIs, MVC, and many others. Please feel free to visit and join the discussion!
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