Can "expression is" call a VB function?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'd like to wire up some conditional formatting on a form, but the logic is
somewhat complex. I could easily write it in VB, but I'm not sure how to
"connect" that to the conditional formatter. Can I call a VB function using
"expression is"? I can't find any examples of this if it is possible.

Maury
 
Maury Markowitz said:
I'd like to wire up some conditional formatting on a form, but the
logic is somewhat complex. I could easily write it in VB, but I'm not
sure how to "connect" that to the conditional formatter. Can I call a
VB function using "expression is"? I can't find any examples of this
if it is possible.

Sure. See some of the magic wrought by Stephen Lebans at

http://www.lebans.com/conditionalformatting.htm
 
Sure, just use:


Expression is (MyCoolFunction() = True)

You can even pass values in the above function....

Expression is (MyCoolFunction([MyFieldName]) = True)

And, of course, you can just use general expressions like:

Expression is ([MyFieldName] = "Hello")

Also, you can for sake of maintainablity put the function in the forms
module, but I think you do have to declare it as public....(try both)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top