how to call function

E

eb1mom

I found a function that will convert seconds to text. I
copied the code into a forms module. It works very well
but, when I put the code into a standard mudule. I can't
"call" it. The function is named "secondstotext(seconds)"
and on the form I have an unbound text box named seconds
which is date diff in seconds between starttime and
stoptime fields on form. In another unbound text box I
tried to put =secondstotext(seconds). It was automatically
corrected to =secondstotext([seconds]). What am I missing
is this some sort of restriced access word problem? any
help would be apppreciated. thanks
 
L

Lynn Trapp

It looks like Access is recognizing "seconds" as a field in the recordsource
of your form and, thus, adding the brackets. When you say you "can't 'call'"
the function, what do you mean? Do you get an error message?
 
E

eb1mom

Thanks , I had the module named exactly the same as the
function so I renamed that and also renamed my seconds
field and now things work.
-----Original Message-----
It looks like Access is recognizing "seconds" as a field in the recordsource
of your form and, thus, adding the brackets. When you say you "can't 'call'"
the function, what do you mean? Do you get an error message?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


I found a function that will convert seconds to text. I
copied the code into a forms module. It works very well
but, when I put the code into a standard mudule. I can't
"call" it. The function is named "secondstotext(seconds)"
and on the form I have an unbound text box named seconds
which is date diff in seconds between starttime and
stoptime fields on form. In another unbound text box I
tried to put =secondstotext(seconds). It was automatically
corrected to =secondstotext([seconds]). What am I missing
is this some sort of restriced access word problem? any
help would be apppreciated. thanks


.
 
L

Lynn Trapp

Very good. I'm glad you figured it out.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


eb1mom said:
Thanks , I had the module named exactly the same as the
function so I renamed that and also renamed my seconds
field and now things work.
-----Original Message-----
It looks like Access is recognizing "seconds" as a field in the recordsource
of your form and, thus, adding the brackets. When you say you "can't 'call'"
the function, what do you mean? Do you get an error message?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


I found a function that will convert seconds to text. I
copied the code into a forms module. It works very well
but, when I put the code into a standard mudule. I can't
"call" it. The function is named "secondstotext(seconds)"
and on the form I have an unbound text box named seconds
which is date diff in seconds between starttime and
stoptime fields on form. In another unbound text box I
tried to put =secondstotext(seconds). It was automatically
corrected to =secondstotext([seconds]). What am I missing
is this some sort of restriced access word problem? any
help would be apppreciated. thanks


.
 

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