Hi Darryl,
Please forgive my using the wrong term for Macro - my familiarity is with vba in excel. All macros in excel are in vba, and that is all I write in. Just used the wrong term.
You are indeed correct, it is a matter of scope.
In excel/vba any code called from a form has access to...
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...
Perfect. That is exactly what is needed. Thank you so much!!!
Worked like a charm.
I have found the biggest problem I have had is figuring out the punctuation.
Thanks again!!!
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.