This is driving me nuts.
I have an access database, with a form called frmStatus.
The form has txtStatus and lblStatus
I have a module which wants to change the value of the textbox or label on the form (I don't care which)
I keep getting a runtime error '424' (object required).
The:
DoCmd.OpenForm ("frmstatus")
works because it indeed opens the form.
It appears that the form name is recognized because when I type it in lower case, it changes the S to upper case, but none of these commands seem to work (all generate that error):
Option Compare Database
Public Sub main()
DoCmd.OpenForm ("frmstatus")
Set frmstatus.txtStatus.Text = "mike"
frmstatus!txtStatus.Value = "mike"
Set frmstatus.txtStatus.Value = "mike"
frmstatus.lblstatus.Value = "mike"
frmstatus.lblstatus.Text = "mike"
frmstatus!txtStatus.Text = 1
I must be missing something fairly fundamental,
Any tips would be greatly appreciated.
Thanks,
Mike
Start Free Trial