Here is my dilemma;
I have 3 Columns;
Vendor -- CheckAmount -- CheckBox
AA -- 200 --
AA -- 250 --
AA -- 5000 --
BB -- 599.99 --
CC -- 150 --
DD -- 600 --
EE -- 200 --
EE -- 200 --
EE -- 200 --
What I need to have is, when the form loads, I need a script that runs that does some calculations. If a specific vendor has equal to or greater than $600 total, I need to check the box, FOR ALL OF THE SAME VENDOR. See below for what the form should look like when this script runs.
AA -- 200 -- X
AA -- 250 -- X
AA -- 5000 -- X
BB -- 599.99 --
CC -- 150 --
DD -- 600 -- X
EE -- 200 -- X
EE -- 200 -- X
EE -- 200 -- X
This is what I currently have, which only checks the boxes for a total of more than 599.99, I know I need to add more, or even try to make some sort of query that runs through the file and then checks the boxes for sums totaling more than 600 for each client. I just don’t know HOW to do that!
Here is what I currently have:
Dim rst As DAO.Recordset
Dim vc As Long
DoCmd.GoToRecord , , acFirst
Set rst = Me.RecordsetClone
rst.MoveFirst
Do While Not rst.EOF
vc = vc + 1
If vc > 1 Then DoCmd.GoToRecord , , acNext
If InvCheckAmount > 599.99 Then
[Inv1099Activity] = -1
End If
rst.MoveNext
Loop
DoCmd.GoToRecord , , acFirst
Me.Repaint
Set rst = Nothing
I have 3 Columns;
Vendor -- CheckAmount -- CheckBox
AA -- 200 --
AA -- 250 --
AA -- 5000 --
BB -- 599.99 --
CC -- 150 --
DD -- 600 --
EE -- 200 --
EE -- 200 --
EE -- 200 --
What I need to have is, when the form loads, I need a script that runs that does some calculations. If a specific vendor has equal to or greater than $600 total, I need to check the box, FOR ALL OF THE SAME VENDOR. See below for what the form should look like when this script runs.
AA -- 200 -- X
AA -- 250 -- X
AA -- 5000 -- X
BB -- 599.99 --
CC -- 150 --
DD -- 600 -- X
EE -- 200 -- X
EE -- 200 -- X
EE -- 200 -- X
This is what I currently have, which only checks the boxes for a total of more than 599.99, I know I need to add more, or even try to make some sort of query that runs through the file and then checks the boxes for sums totaling more than 600 for each client. I just don’t know HOW to do that!
Here is what I currently have:
Dim rst As DAO.Recordset
Dim vc As Long
DoCmd.GoToRecord , , acFirst
Set rst = Me.RecordsetClone
rst.MoveFirst
Do While Not rst.EOF
vc = vc + 1
If vc > 1 Then DoCmd.GoToRecord , , acNext
If InvCheckAmount > 599.99 Then
[Inv1099Activity] = -1
End If
rst.MoveNext
Loop
DoCmd.GoToRecord , , acFirst
Me.Repaint
Set rst = Nothing