pauljkeenan
Programmer
Hi people
I have a mainform and below that a subform used to display recordsets. On the main form I have a "refresh list" button, which justs refreshes the data. I have been using the following code but I get a STRANGE error when I click the button
"runtime error 2465, M.Access cant find the field 'frmVisaSearchSub' referred to in your expression."
Im pretty sure that the code is correct, I copied the syntax from a tutorial. "Me!Subform1.Form.RecordSource" Could someone please advise a newbie? Here's the code
Private Sub cmdRefreshList_Click()
Dim qSql As String
qSql = "SELECT * FROM [tblRecordInfo] "
Me!frmVisaSearchSub.Form.RecordSource = qSql
Me!frmVisaSearchSub.Form.Requery
End Sub
the name of the subform is correct, but I always get this error. Thanks guys, very much appreciated.
I have a mainform and below that a subform used to display recordsets. On the main form I have a "refresh list" button, which justs refreshes the data. I have been using the following code but I get a STRANGE error when I click the button
"runtime error 2465, M.Access cant find the field 'frmVisaSearchSub' referred to in your expression."
Im pretty sure that the code is correct, I copied the syntax from a tutorial. "Me!Subform1.Form.RecordSource" Could someone please advise a newbie? Here's the code
Private Sub cmdRefreshList_Click()
Dim qSql As String
qSql = "SELECT * FROM [tblRecordInfo] "
Me!frmVisaSearchSub.Form.RecordSource = qSql
Me!frmVisaSearchSub.Form.Requery
End Sub
the name of the subform is correct, but I always get this error. Thanks guys, very much appreciated.