grobermatic
Technical User
Hi,
I always get confused when it coms to referencing a form in VBA, I'm ok when referencing it directly (hard coding it) but I'm confused when using variables as forms??
========================================================
I'm using this simple code:
Dim strParentFormName As String
strParentFormName = Me.OpenArgs
Me.OpenArgs.Refresh
DoCmd.Close acForm, Me.Name
=========================================================
It doesn't work ?!?
I tried declaring the variable as a Form but then I get errors like "Object Required" and I sometimes get the message "Invalid Object Qualifier"
It would really help me with future projects if I didn't keep coming up against this problem.
Any advice would be much appreciated!!
Thanks
Craig
I always get confused when it coms to referencing a form in VBA, I'm ok when referencing it directly (hard coding it) but I'm confused when using variables as forms??
========================================================
I'm using this simple code:
Dim strParentFormName As String
strParentFormName = Me.OpenArgs
Me.OpenArgs.Refresh
DoCmd.Close acForm, Me.Name
=========================================================
It doesn't work ?!?
I tried declaring the variable as a Form but then I get errors like "Object Required" and I sometimes get the message "Invalid Object Qualifier"
It would really help me with future projects if I didn't keep coming up against this problem.
Any advice would be much appreciated!!
Thanks
Craig