Pass form data to a function.

S

Snickerfritz

I am looking for a meathod of sending information within a form to be
passed to a function.

Any suggestions?

Snickerfritz
 
P

PC Datasheet

Say you have a textbox named My textbox on a form named My form. You can
pass the value in the textbox to the code in the function with the
expression:
Forms!MyForm!MyTextBox
Or;
If your Function has a parameter and looks like Function MyFunction(MyParam
As String) As Boolean, using the function in the code module like this
MyFunction(Me!MyTextbox) will put the value in the textbox in the function's
code everywhere "MyParam" appears.
 

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

Top