I was wondering if someone could help me with this. The code below opens up a continuous form, identical to the previous one except that certain fields are not locked for editing (we call this Admin Edit Mode). Only certain people in the group have Admin rights.
I have now implemented a new feature on the "regular" form that enables you to search for multiple records through the one parameter value box (searching on the "RefNo" field). So now the regular form may contain multiple records with different "RefNo" fields. The consequence of this is that if you click the Admin Edit Mode button, only the record in the regular form that has the current focus will open in the Admin screen because (I think) the Link Criteria is set to "RefNo", which may be different for each record on the continuous regular form.
How can I set the link criteria to open the Admin form to display all of the records from the regular form?
Private Sub AdminEditMode_Click()
On Error GoTo Err_AdminEditMode_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_Coordination_Edit"
stLinkCriteria = "[RefNo]=" & "'" & Me![RefNo] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
MsgBox "I'm sorry. You do not have permission to enter Admin Edit Mode."