Hey everyone,
I know this problem has come up on the forums and I have read the threads to see if they will help me solve my problem but I cannot get the problem fixed. I am trying to get a profit margin percentage by doing a Davg of the two fields I need from a query I have. Here is the code:
Me.txtmargin = DAvg("Profit / TOTAL_QUOTE", "MARGIN", "SALES_PERSON_LAST_NAME='" & holdperson & "' AND clng(metMONTH)=" & holdmonth & " AND clng(metYEAR)=" & holdyear)
I keep getting an overflow run-time error. I have tried converting both fields into doubles and long integers but it is still giving me the error. If someone could help me out I would be greatly appreciative. Thank you!
I know this problem has come up on the forums and I have read the threads to see if they will help me solve my problem but I cannot get the problem fixed. I am trying to get a profit margin percentage by doing a Davg of the two fields I need from a query I have. Here is the code:
Me.txtmargin = DAvg("Profit / TOTAL_QUOTE", "MARGIN", "SALES_PERSON_LAST_NAME='" & holdperson & "' AND clng(metMONTH)=" & holdmonth & " AND clng(metYEAR)=" & holdyear)
I keep getting an overflow run-time error. I have tried converting both fields into doubles and long integers but it is still giving me the error. If someone could help me out I would be greatly appreciative. Thank you!