A family of Microsoft relational database management systems designed for ease of use.
If this crashes Access, you have SOME level of corruption going on. Use standard techniques to overcome it.
You did already decompile, yes?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Having problem with Access 2016 with code that runs just fine in Access 2013. I am trying to set a recordset clone:
Public Sub cmdReport_Click()
On Error GoTo cmdReport_Click_Err
Dim strFields As String
Dim strWhere As String
Dim strFrom As String
Dim strOrderBy As String
Dim strGroupBy As String
Dim booTotals As Boolean
Dim strQueryName As String
Dim qdUserQuery As DAO.QueryDef
Dim Rs As DAO.Recordset
Dim Db As DAO.Database
Dim i As Integer
Dim strSQL As String
Stop
Me![sfrmQBFFields].Form.Requery
Stop
Set Rs = Me![sfrmQBFFields].Form.RecordsetClone
Stop
Rs.MoveLast
i = Rs.RecordCount
Rs.MoveFirst
Stop
Processing hangs when executing the statement:
Set Rs = Me![sfrmQBFFields].Form.RecordsetClone
the application hangs and I have to cancel with Task Manager
Rs has been defined.
sfrmQBFFields is the name of the object containing the subform
my references include Microsoft DAO 3.6 object library
Suggestions?
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
If this crashes Access, you have SOME level of corruption going on. Use standard techniques to overcome it.
You did already decompile, yes?
Thanks Tom.
Your slightly different syntax was no help.
bob
.Clone is a different animal - see help file.
The best syntax is:
With Me.sfrmQBFFields.Form.RecordsetClone
'do your thing
End With
Why "best"? Because you get automatic cleanup of the recordsetclone at the end of the With block.
Interesting idea. Was not aware that the alternate syntax could be used.
However, no joy.
bob
Hi. Not sure if it will make any difference but you could maybe try:
Set Rs = Me![sfrmQBFFields].Form.Recordset.Clone
Hope it helps...