Problem with calling a visual basic function from a form field

CSCS

Registered User.
Local time
Today, 09:08
Joined
Jan 10, 2004
Messages
91
Dear All.

I have a visual basic function, placed in a module.
I need to call it from a form field, and pass a value to it and the function has to return a value.

I tried it but it doesn't work
the value I get on the field is " #Name? "

any help will be very appreciated.

Thanks!
CS.
 
How are you calling the function and where is the fuction written?

the call to a function shoudl be in the controlls record source with the format
=AddVal(10)

Peter
 
What do you mean by "value in the Name property on the Other tab is not the name of a field in the RecordSource"
 
Can you paste the code what's this function is processing? What I understands is:

In the field record source;

=YourFunction(RecevingVariable) --- this maybe the name of the field itself...

Rody
 
Make sure that the name of the control in which you are adding this function call does not have the same name as a field in the record source of your form.

The "Other" tab is the tab in the property sheet where you can rename a control. Format, Data, Event, Other, All.
 
can you post what you have on the form?

Peter
 
You should be able to call it by simply typing:

ConvertCurrencyToEnglish(Your Number), make sure you pass a valid number so you might want to convert the value to number before passing it on to the fucntion. ie:

Dim myValue as Long
myValue = CLng(myTxtbox.value)

ConvertCurrencyToEnglish(myValue)
 

Users who are viewing this thread

Back
Top Bottom