Hello guys,
This is the code that I use to double click on text box displaying certain data that calls the function that will go to a particular form/screen and open it displaying data relevant for that record
Private Sub Text40_DblClick(Cancel As Integer)
Dim ctl As Control
Dim frm As Form
Set frm = Forms!frmSearch
Set ctl = frm!Text40
Call OpenEdit_ARegisterEntry(ctl.Text)
End Sub
But in stead of doing this I have a command button and would like to do the same thing by clicking on the button,it opens the relevant form with relevant data,but when I do that this is the error message I get and highlights the line of code
error: object doesn't support this property or method
Call OpenEdit_ARegisterEntry(ctl.Text)
which property do I need to assign to my control(that being a command button) in order for this to work, anybody.
Thanks heaps
This is the code that I use to double click on text box displaying certain data that calls the function that will go to a particular form/screen and open it displaying data relevant for that record
Private Sub Text40_DblClick(Cancel As Integer)
Dim ctl As Control
Dim frm As Form
Set frm = Forms!frmSearch
Set ctl = frm!Text40
Call OpenEdit_ARegisterEntry(ctl.Text)
End Sub
But in stead of doing this I have a command button and would like to do the same thing by clicking on the button,it opens the relevant form with relevant data,but when I do that this is the error message I get and highlights the line of code
error: object doesn't support this property or method
Call OpenEdit_ARegisterEntry(ctl.Text)
which property do I need to assign to my control(that being a command button) in order for this to work, anybody.
Thanks heaps