Replace #Num! with 0 (1 Viewer)

Ravi Kumar

Registered User.
Local time
Tomorrow, 03:09
Joined
Aug 22, 2019
Messages
152
Dear all ,

I have made a report in which to check the percentage I have entered a formula , hence if there is 0 in both the fields obviously the formula is giving #Num! error.
Is there any way to replace this with 0 whenever this error occurs??
 

GinaWhipp

AWF VIP
Local time
Today, 17:39
Joined
Jun 21, 2011
Messages
5,673
Hmm, without seeing the formula.... how about wrapping each variable in Nz()
 

Ravi Kumar

Registered User.
Local time
Tomorrow, 03:09
Joined
Aug 22, 2019
Messages
152
Hmm, without seeing the formula.... how about wrapping each variable in Nz()
Sir ..sorry I forgot to add the formula ..here it is =[Sum Of Rework Qty]/[Sum Of Inspected Qty]
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 17:39
Joined
Feb 19, 2002
Messages
29,006
Since you can't divide by 0, you need an IIf()
IIf(Nz([Sum Of Inspected Qty],0) = 0, 0, [Sum Of Rework Qty] / [Sum Of Inspected Qty])

PS object names should only contain upper/lower case letters, numbers and the underscore. They should never contain embedded spaces or special characters.
 

Ravi Kumar

Registered User.
Local time
Tomorrow, 03:09
Joined
Aug 22, 2019
Messages
152
Thank you sir. I will note the tip & use the same in next projects.
 

plog

Banishment Pending
Local time
Today, 16:39
Joined
May 11, 2011
Messages
9,903
In the standard module I add to all my databases I have a function called SafeDivision() which takes a numerator and denominator and essentially does the same as what Pat posted (it also tests for nulls). That way, when I want to do division in my database that doesn't error out, I use it instead of the inline method posted above.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 17:39
Joined
May 21, 2018
Messages
3,195
@NauticalGent
I find your post very repulsive coming from a position of obvious priviledge. Assuming someone's preferred pronouns is absolutely never acceptable!
Recommend that this forum adopt the following guidance to avoid mistakes like this. Just because the name is Gina... why would you assume that is acceptable to guess? You should refer to this Gina Ze or the Theyperson as Mx. See important guidance below to avoid potential future problems. It is very clear and simple
She, her, hers and he, him, his are the most commonly used pronouns. Some people call these "female/feminine" and "male/masculine" pronouns, but we must avoid these labels at all cost because they are offensive, for example, not everyone who uses he feels like a "male" or "masculine."

There are also lots of gender-neutral pronouns in use. Here are a few recommended:

They, them, theirs (Xena ate their food because they were hungry.) This is is a pretty common gender-neutral pronoun.... And yes, it can in fact be used in the singular.

Ze, hir (Xena ate hir food because ze was hungry.) Ze is pronounced like "zee" can also be spelled zie or xe, and replaces she/he/they. Hir is pronounced like "here" and replaces her/hers/him/his/they/theirs.

Just my name please! (Xena ate Xena's food because Xena was hungry) Some people prefer not to use pronouns at all, using their name as a pronoun instead.
Further
Generic Gender-Neutral Terms:
Friend, Associate, Buddy, Pal, Companion, Individual, Person, Accomplice, Colleague, Comrade, Acquaintance, Being, Someone, or Coworker.
GNL + NEL Terms For Family Roles:
Parent, Child, Sibling, Youth, Kid, Grandparent, Cousin, Relative
Nibling — Nonbinary equivalent of a Niece or Nephew. People also use Niblet for this purpose
Ren/Renny — Focusing on the ‘ren’ in ‘Parent’ to create a term similar to Mom/Mommy or Dad/Daddy. Sounds like ‘wren’; the bird.
Sib/Sibler — Nonbinary equivalent of Sister/Brother and related shortened terms.
GNL + NEL Terms For Relationship Roles:
Partner, Spouse, Paramour, Lover, Date, Sweetheart, Honey, Betrothed, Significant Other, Engaged
Theyfriend — Nonbinary equivalent of Girlfriend/Boyfriend. You can use any pronoun in place of the ‘they’ in ‘Theyfriend’ if a person uses other pronouns.
Theyspouse — Similar to ‘Theyfriend’; use of pronouns as a suffix to create explicitly nonbinary terms. A spouse who is nonbinary.
Datefriend, Bothfriend, Lovefriend, Datemate — Other nonbinary terms for an individual who is dating someone and is nonbinary. Up to personal choice and preference.
Nonbinary-exclusive Terms For Person:
Enby — A shortening of the word nonbinary similar to girl/boy. Good word for a nonbinary child. Very validating word for some nonbinary people. Many nonbinary people of all ages enjoy this term, however it has a slightly feminine feel to it which can be uncomfortable for some nonbinary people. Little less than half of all nonbinary people dislike this term for multiple reasons. However, many nonbinary people do like this word. It’s best to check before using it for someone. [Not a good term for the nonbinary community at whole; it’s best to just write out the whole word!]
Androgyne — A bit vintage, dating back to Victorian language for androgynous and/or intersex people. Means ‘An androgynous individual’. Can be shortened to ‘Andro’ for a simpler term. Not all nonbinary people are androgynous, so again it’s good to check. Especially for nonbinary people who lean towards the feminine side of things, this term can make them especially uncomfortable. Please be considerate and always ask before using a term for someone.
Theyperson — In following the more recent format of pronoun-based terms, a [Pronoun]person is a term interchangeable with all potential pronoun sets regardless of gender, but does allow for nonbinary-exclusive terms such as this one with less potential for misgendering or inducing dysphoria. Some nonbinary people will just prefer GNL over NEL, as intentionally outing oneself as nonbinary is not always the desire or goal for every single person.
They — While they is a pronoun used for many nonbinary people instead of she or he [Ex: Vin is a writer and they are writing this piece right now.] it is also a potential alternative term to ‘enby’ for a nonbinary person for those who don’t want to write out ‘nonbinary’ every single time. The writer of this piece enjoys being referred to as ‘a they’, or in ways similar to ‘They’re a they and they’ll be taking your order’ etc. (They do not enjoy being referred to as an enby!) However, some nonbinary people may find this dehumanizing as women and men are not often referred to as ‘a she’ or ‘a he’ in the same fashion. As usual, depends on the needs of each individual.
Replacement for Ma'am and Sir
There are multiple honorifics and titles for individuals which are gender neutral linguistically. The most common honorific is the term ‘Mx.’ [said like ‘mix’]. The x acts as a wild card, taking the usual title format of Mr and Ms, and putting in an x to remove the gender in the title. This honorific has been legally recognized by several businesses, countries, and other associations but is primarily only seen on actual paperwork in the U.K. as of this moment. Places such as Canada, Washington, California, and Oregon will likely eventually follow as they all also work towards legal recognition of nonbinary trans people. However, we are still a good ways away from ‘Mx’ being listed as an option everywhere.(Much less other nonbinary honorifics!) Other honorifics include: Ind., Rev., Dr., M., Misc., Mre., Msr., Myr., Pr., or Mn..
Please take this lesson to heart and follow the simple guidance. I hope not to see such offensive posts from you in the future.
Please take this opportunity to apoligize to the they person @GinaWhipp
 

NauticalGent

CopyPaster of the First Order
Local time
Today, 23:39
Joined
Apr 27, 2015
Messages
2,901
It was Pat I was referring to. I KNOW Pat is female and was making the OP aware of that.

If Pat or the OP wishes to take this up with me than I will entertain that.

Although I respect you and your skills, I care not if you are repulsed or offended by a post that was not meant to be either.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 17:39
Joined
May 21, 2018
Messages
3,195
Although I respect you and your skills, I care not if you are repulsed or offended by a post that was not meant to be either
Wow that was supposed to be an over the top extremely sarcastic joke of current US absurd political correctness. Guess that did not go over well.
 

NauticalGent

CopyPaster of the First Order
Local time
Today, 23:39
Joined
Apr 27, 2015
Messages
2,901
Dude...you got me good. I was speechless. Its on now bud!
 

NauticalGent

CopyPaster of the First Order
Local time
Today, 23:39
Joined
Apr 27, 2015
Messages
2,901
Hopefully Ravi caught the humor...I have no issue if you want to move the posts to the Lunch Money post in the WC if you think its best...
 

isladogs

CID Moderator
Staff member
Local time
Today, 22:39
Joined
Jan 14, 2017
Messages
13,418
I thought it was very witty as well - I just hope Ravi did also
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 17:39
Joined
Feb 19, 2002
Messages
29,006
Got me too:giggle: I thought we were going to see a fist fight. Unfortunately, the people the joke targeted won't get it.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 17:39
Joined
May 21, 2018
Messages
3,195
@NauticalPerson,
Did not mean to catch you off guard, but just sharing knowledge off the internet.
and
You just can not make this stuff up.

I am pretty accepting of this issue and if someone wants to be he, she, they or go by their name I am fine with that, but you got to pick one. If you consider yourself both, neither, or something all together different that is where I draw the line. There will be no
Code:
HE/SHE    HIM/HER    HIS/HER    HIS/HERS    HIMSELF/HERSELF
zie    zim    zir       zis       zieself
sie    sie     hir       hirs     hirself
ey     em    eir       eirs     eirself
ve     ver    vis       vers    verself
tey    ter    tem     ters     terself
e       em    eir      eirs      emself
And for sure I am not calling anyone a Theyperson, Nibling, Enby, or Theyspouse.
However if anyone is curious here are my preferred pronouns:
Your Emminence
Lord of the Manor
Your Highness
Your Dudeness or simply The Dude or The Duderino
 

Ravi Kumar

Registered User.
Local time
Tomorrow, 03:09
Joined
Aug 22, 2019
Messages
152
I live in India & I just came to office , opened the website to see my posts & Whoa!!!
Anyway ….Honestly I didn't quite got the joke and for sure I will use correct grammar in my next posts :).
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 17:39
Joined
May 21, 2018
Messages
3,195
Anyway ….Honestly I didn't quite got the joke and for sure I will use correct grammar in my next posts
Sorry for hijacking your thread.

Actually in indan culture this may not seem so funny, since my understanding is there has always been a concept of a third gender.

However, in the US we are taking political correctness to the extreme, we have hundred of genders you can choose to call yourself. I think Facebook gives you 75 choices. Your grammar is fine. NauticalGent was trying to explain to you that it was Patricia (female) and not Patrick (male) that helped you. (I have seen a few others make that mistake). So I just sarcastically pointed out how to him that here in the states you can have hundreds of gender neutral pronouns and many of them are ridiculous and silly made up words. However, here in the states if someone considers themselves a different gender than their biology and you assume wrong in what they prefer, you have committed an inexcusable micro-aggression.
 

Ravi Kumar

Registered User.
Local time
Tomorrow, 03:09
Joined
Aug 22, 2019
Messages
152
Sorry for hijacking your thread.

Actually in indan culture this may not seem so funny, since my understanding is there has always been a concept of a third gender.

However, in the US we are taking political correctness to the extreme, we have hundred of genders you can choose to call yourself. I think Facebook gives you 75 choices. Your grammar is fine. NauticalGent was trying to explain to you that it was Patricia (female) and not Patrick (male) that helped you. (I have seen a few others make that mistake). So I just sarcastically pointed out how to him that here in the states you can have hundreds of gender neutral pronouns and many of them are ridiculous and silly made up words. However, here in the states if someone considers themselves a different gender than their biology and you assume wrong in what they prefer, you have committed an inexcusable micro-aggression.
Ohh ...Thank you ..Now I got it :) .
 

sxschech

Registered User.
Local time
Today, 14:39
Joined
Mar 2, 2010
Messages
664
And some years ago, a radio talk show host mentioned (don't know if this is the correct spelling) huperthing, in order to remove man and son from human, person...
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom