how to call function

  • Thread starter Thread starter eb1mom
  • Start date Start date
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
 
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?
 
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


.
 
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


.
 
Back
Top