Hopefully someone can assist me with this issue, I'm drawing a blank on how to fix this...
I need to somehow force the front end user to go to the last record before they can assign a new number for a report command event.
Currently the coding is this
Private Sub Command71_Click()
Dim MAXMRR As Integer
Dim NumMRR As Integer
NumMRR = DCount("[MRR#]", "MRR")
If NumMRR > 0 Then
MAXMRR = DMax("[MRR#]", "MRR")
Else
MAXMRR = 0
End If
'MAXMRR = DMax("[MRR#]", "MRR")
Me![MRR#] = MAXMRR + 1
End Sub
Unfortunately this allows people to overwrite existing assigned report #'s by clicking on the button if they don't go the next record by manually clicking "next record" on the bottom of the form.
So just for examples sake this is what can occur (and did occur bringing this issue to my attention)
If it is used correctly and you created the first 5 reports with no issue we would have
Report #1 = MRR-001 (then you would hit [next record] manually for each report)
Report #2 = MRR-002
Report #3 = MRR-003
Report #4 = MRR-004
Report #5 = MRR-005
The problem occurs when a new user logs in and starts the page / form opens at Report #1 / MRR-001 and then they hit the "Assign MRR#" button it would then overwrite MRR#-001 as MRR#-006 with out changing any other field data.
This error is reproducable on any form in any number of combinations but you can only assign a new # once when you first open the form so to further eloborate on the above say they open report / form #001 and hit assign next MRR# it would change it to MRR#-006 but if you hit again it would not to go to MRR#-007, However if you moved to MRR#-002 and hit assign new MRR# it would go to MRR#-007 and also if you closed out the form and opened it again you would then see MRR#-006 where MRR#-001 used to be and you could again click on Assign MRR# and change -006 to -007.
Hope that makes sense.
Anyone help me out here?
Thanks
Calvin
I need to somehow force the front end user to go to the last record before they can assign a new number for a report command event.
Currently the coding is this
Private Sub Command71_Click()
Dim MAXMRR As Integer
Dim NumMRR As Integer
NumMRR = DCount("[MRR#]", "MRR")
If NumMRR > 0 Then
MAXMRR = DMax("[MRR#]", "MRR")
Else
MAXMRR = 0
End If
'MAXMRR = DMax("[MRR#]", "MRR")
Me![MRR#] = MAXMRR + 1
End Sub
Unfortunately this allows people to overwrite existing assigned report #'s by clicking on the button if they don't go the next record by manually clicking "next record" on the bottom of the form.
So just for examples sake this is what can occur (and did occur bringing this issue to my attention)
If it is used correctly and you created the first 5 reports with no issue we would have
Report #1 = MRR-001 (then you would hit [next record] manually for each report)
Report #2 = MRR-002
Report #3 = MRR-003
Report #4 = MRR-004
Report #5 = MRR-005
The problem occurs when a new user logs in and starts the page / form opens at Report #1 / MRR-001 and then they hit the "Assign MRR#" button it would then overwrite MRR#-001 as MRR#-006 with out changing any other field data.
This error is reproducable on any form in any number of combinations but you can only assign a new # once when you first open the form so to further eloborate on the above say they open report / form #001 and hit assign next MRR# it would change it to MRR#-006 but if you hit again it would not to go to MRR#-007, However if you moved to MRR#-002 and hit assign new MRR# it would go to MRR#-007 and also if you closed out the form and opened it again you would then see MRR#-006 where MRR#-001 used to be and you could again click on Assign MRR# and change -006 to -007.
Hope that makes sense.
Anyone help me out here?
Thanks
Calvin