var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: The Variable problem
there is a little problem I am having
I am dealing with several forms and I want to build a function in the module to access all forms with the changes in the formname variable
here is what I have
This code is under a module
DocumentSelector is a combo box in Form1
Opendocument is a Button in Document1
Const formname = "Form1"
If Forms!formname!DocumentSelector = "Document1" Then
Forms!formname!Opendocument.HyperlinkAddress = Path & "Document1.doc"
This code does not work however, if i do
If Forms![Form1]!DocumentSelector = "Document1" Then
Forms![Form1]!Opendocument.HyperlinkAddress = Path & "Document1.doc"
so the only problem is that when I replace the actual test of Form1 with a variable formname = "Form1" it will not work...
If you have any idea, please let me know,...
Thank you in advance
Thank you Teddy
Thanks a lot Teddy. But can you give me a reason why it doesn't work? Just so I can avoid it in the future
Well, basically the variable you were passing is a string. The "forms!targetform!targetobject" method does not accept any parameters. The "forms(targetform)" method accepts a string, or string variable for the form name. Basically you were trying to pass a variable to something that doesn't accept any variables.