Calulation problem Please Help!

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

Guest

Hello,

I am having a bit of trouble trying to get a calculation to work on my form.
Here is what I am using:

Private Sub DaysLeft_Click()
If Me.DaysLeft = "Full" Then
Me.PreAdjust = [EstPrem] + [Taxes]
End If

If Me.DaysLeft = "Partial" Then
Me.PreAdjust = [EstAnnual] / 360 * [FullPart]
End If
End Sub

What I want is when the CBO "DaysLeft" is clicked, if the user selcets Full
then I to calculate the "EstPrem" + "Taxes" and if they select Partial, I
need for it to calculate "EstAnnual" / 360 * "FullPart" and in either case
have the result fill in the PreAdjust" field. I have the PreAdjust field set
to Currency which shows the $0 but when I make a selection from the CBO, the
PreAdjust field goes blank. This is my last piece to this form and could
really use some help if possible.

Thank you in advance!!
 
Put a debug stop and walk through the code line by line. Verify that each
parameter is what you expect. In other words, does [EstPrem] actually
contain a value or is it Null or undefined when running the code?
Hello,

I am having a bit of trouble trying to get a calculation to work on my form.
Here is what I am using:

Private Sub DaysLeft_Click()
If Me.DaysLeft = "Full" Then
Me.PreAdjust = [EstPrem] + [Taxes]
End If

If Me.DaysLeft = "Partial" Then
Me.PreAdjust = [EstAnnual] / 360 * [FullPart]
End If
End Sub

What I want is when the CBO "DaysLeft" is clicked, if the user selcets Full
then I to calculate the "EstPrem" + "Taxes" and if they select Partial, I
need for it to calculate "EstAnnual" / 360 * "FullPart" and in either case
have the result fill in the PreAdjust" field. I have the PreAdjust field set
to Currency which shows the $0 but when I make a selection from the CBO, the
PreAdjust field goes blank. This is my last piece to this form and could
really use some help if possible.

Thank you in advance!!
 
Hi,

It is null until the code runs however, I missed a step. I need to input the
collateral code in order for the taxes and estimated premium to fill in which
will then put the figure in the Premium Adjustment field once the user
selecets Full or Partial. I didn't catch it at first but I changed the field
on the form to a more orderly structure and it works fine. Thank you so much
for replying. I apologize for your time it was completely an oversight on my
part.

Thank you and have a great day!!

kingston via AccessMonster.com said:
Put a debug stop and walk through the code line by line. Verify that each
parameter is what you expect. In other words, does [EstPrem] actually
contain a value or is it Null or undefined when running the code?
Hello,

I am having a bit of trouble trying to get a calculation to work on my form.
Here is what I am using:

Private Sub DaysLeft_Click()
If Me.DaysLeft = "Full" Then
Me.PreAdjust = [EstPrem] + [Taxes]
End If

If Me.DaysLeft = "Partial" Then
Me.PreAdjust = [EstAnnual] / 360 * [FullPart]
End If
End Sub

What I want is when the CBO "DaysLeft" is clicked, if the user selcets Full
then I to calculate the "EstPrem" + "Taxes" and if they select Partial, I
need for it to calculate "EstAnnual" / 360 * "FullPart" and in either case
have the result fill in the PreAdjust" field. I have the PreAdjust field set
to Currency which shows the $0 but when I make a selection from the CBO, the
PreAdjust field goes blank. This is my last piece to this form and could
really use some help if possible.

Thank you in advance!!
 
Back
Top