Im getting a #Num! in my text box

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

Guest

Hello, I have a text box and its function is only to give me a % from two
other text boxes. I used =[Text25]/[Text89]&"%" when I go to regular view
its giving me a #Num! in the text box. The other two text boxes have time in
them and show 0:00 what am I doing wrong? This is my first database so please
explain for a newb! Thanks!!!
 
You need to understand just a little bit about math. Apparently you are
attempting to divide by zero. I'm not sure why you would want to divide one
time by another but the general way of handling this is:

=IIf(NumberA = 0, 0, NumberB/NumberA)
 
That works well, but I use a little different approach.

=NumberB / IIf(Nz(NumberA,0) = 0, 1, NumberA)

Which way you do it depents on the result you want. Yours will return a
zero, mine will return Number B.

Duane Hookom said:
You need to understand just a little bit about math. Apparently you are
attempting to divide by zero. I'm not sure why you would want to divide one
time by another but the general way of handling this is:

=IIf(NumberA = 0, 0, NumberB/NumberA)

--
Duane Hookom
MS Access MVP
--

oxicottin said:
Hello, I have a text box and its function is only to give me a % from two
other text boxes. I used =[Text25]/[Text89]&"%" when I go to regular view
its giving me a #Num! in the text box. The other two text boxes have time
in
them and show 0:00 what am I doing wrong? This is my first database so
please
explain for a newb! 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

Back
Top