Recordset of Subform(Datasheet) inside another subform which is inside a mainform (1 Viewer)

ramoj

New member
Joined
Dec 16, 2013
Messages
1
Hi All,

I am new to this Forum.

Good Day All,

I'm having a problem with the syntax of a recordset of a Datasheet inside a subform which is also inside a Main Form.

Main Form - frm_1_0_LMS
Subform - frm_1_4_0_TeamApprovals
Subform(Datasheet) - frm_1_4_1_TeamApprovalsList

Here is my code:
Code:
Dim rs As DAO.Recordset

Set rs = Forms![COLOR=Red]frm_1_0_LMS[/COLOR].[COLOR=Blue]frm_1_4_0_TeamApprovals[/COLOR].[COLOR=DarkGreen]frm_1_4_1_TeamApprovalsList[/COLOR].Form.Recordset

If Not (rs.EOF And rs.BOF) Then
 Forms!frm_1_4_2_ApproveDeclineUserLeave.Controls("lblFiledDateLeave").Caption = rs!Leave_Date
End If
I am getting this error:
Object doesn't support this property or method

Any replies are highly appreciated.

Thanks in advance.
 

pr2-eugin

Super Moderator
Joined
Nov 30, 2011
Messages
8,498
Hello ramoj, Welcome to AWF :)

Try RecorsetClone instead of Recordset.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom