OK the plog mystery has been solved.
It wasn't too many quotes, it was not enough:
this works:
Sub PlogTest2()
str1 = Chr(34) & "Hello" & Chr(34)
Eval ("MsgBox(" & str1 & ")")
End Sub
The way he wrote it, it Eval() wasn't evaluating the "msgbox" it was opening the msgbox, in an attempt to get data to evaluate.
so YES, the FUNCTION needs to be in quote marks.
as for mystery 2: "The stringexpr argument must evaluate to a string or numeric value; it can't evaluate to a Microsoft Access object." Controls on forms is just an exception to that rule.
So using the corrected (PlogTest2) syntax, Access is no longer abruptly quitting.
I am getting a "cannot find name: MyObject" error. And I think that's the end.
You cannot use Eval() on methods. Functions: yes, methods: no.
You can't use Eval on a DoCmd statement, and now I'm reading that "VB is a compiler language, and you can't compile code during runtime"
So back to the OP: How to pass multiple parameters to a Method??
It wasn't too many quotes, it was not enough:
this works:
Sub PlogTest2()
str1 = Chr(34) & "Hello" & Chr(34)
Eval ("MsgBox(" & str1 & ")")
End Sub
The way he wrote it, it Eval() wasn't evaluating the "msgbox" it was opening the msgbox, in an attempt to get data to evaluate.
so YES, the FUNCTION needs to be in quote marks.
as for mystery 2: "The stringexpr argument must evaluate to a string or numeric value; it can't evaluate to a Microsoft Access object." Controls on forms is just an exception to that rule.
So using the corrected (PlogTest2) syntax, Access is no longer abruptly quitting.
I am getting a "cannot find name: MyObject" error. And I think that's the end.
You cannot use Eval() on methods. Functions: yes, methods: no.
You can't use Eval on a DoCmd statement, and now I'm reading that "VB is a compiler language, and you can't compile code during runtime"
So back to the OP: How to pass multiple parameters to a Method??