Setting RecordSource Property in a split form

N

nigelf

Hi,
I'm trying to set the RecordSource property in a split form in the following
code:

Private Sub cls_RequeryForm(frm As Form_dlgParamCollect)
Dim strWhere as String
strWhere = "WHERE tblShop.ShopID = " & frm.frmShopID
UpdateWhereClause "qryShopAisles", strWhere
Me.RecordSource = "qryShopAisles"
Me.SetFocus
End Sub

Private Sub Form_Open(Cancel As Integer)
Set cls = GetclsShoppingList.ParamCollect
End Sub

Private Sub Form_Close()
Set cls = Nothing
End Sub

This works fine in other forms and reports, but I have this split form where
I'm using it, and I get a loop - as soon as the RecordSource Property is set,
the form_close event is triggered, followed by the open event (again) and so
on. The query works fine elsewhere

help me please!!

Nigel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top