G
Guest
I moved all my code from the lost focus on the text boxes of my form to the
OnCurrent property of the form. I did this because it has become necessary
because of the amount of data that is being entered.
This is a code that I have to check the totals of some items:
IngTot = Me.QtySRej + Me.QtySLgMed + Me.QtySJumbo + Me.QtySColossal
If IngTot <> 10 And DateAdded > Now() - 1 Then
If MsgBox("Total is not equal to 10. " & "The total equals " &
CStr(IngTot) & ".", vbOKCancel) = vbCancel Then
MsgBox ("Check your entries and correct.")
Me!QtySRej.SetFocus
Else
Me.TotalBulbs = IngTot
End If
Else
Me.TotalBulbs = QtySRej + QtySLgMed + QtySJumbo + QtySColossal
End If
It is not working as I want it to do.
I want it to check every line of new data that is greater than yesterday. It
does all the calculations an DLookUp fields but it does not do my total check
and let me know if the total is <> 10.
I would appreciate any help that I can get with this.
Thanks,
Curt
OnCurrent property of the form. I did this because it has become necessary
because of the amount of data that is being entered.
This is a code that I have to check the totals of some items:
IngTot = Me.QtySRej + Me.QtySLgMed + Me.QtySJumbo + Me.QtySColossal
If IngTot <> 10 And DateAdded > Now() - 1 Then
If MsgBox("Total is not equal to 10. " & "The total equals " &
CStr(IngTot) & ".", vbOKCancel) = vbCancel Then
MsgBox ("Check your entries and correct.")
Me!QtySRej.SetFocus
Else
Me.TotalBulbs = IngTot
End If
Else
Me.TotalBulbs = QtySRej + QtySLgMed + QtySJumbo + QtySColossal
End If
It is not working as I want it to do.
I want it to check every line of new data that is greater than yesterday. It
does all the calculations an DLookUp fields but it does not do my total check
and let me know if the total is <> 10.
I would appreciate any help that I can get with this.
Thanks,
Curt