How can one pass a variable form form code to macro code.
StrA is a variable with the value of 8 used in the vba code of a form - frmCustody
We have a macro called Test
how can macro test run the line:
MsgBox strA
and have the value 8 appear in the message box.
Thanks,
B
I have written the following macro that is in module 1.
Sub Test()
DoCmd.SelectObject acForm, "frmCustody"
frmCustody.Me.Controls("F9").Value = "Ag"
End Sub
I get the following error: Object required.
Any ideas how to get the value to show up in the form when the macro runs??
Thanks,
B...
It took forever to get the following line to work in VBA:
Set rst = dbs.OpenRecordset("Select [LocationName] from PWS where [LocationNumber] = '" & Me.LocationNumber & "';")
Now I am trying to get the following line of code to run with no success:
Set rst = dbs.OpenRecordset("Select...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.