Hi All,
I have a form with a field "ID" and a View Button. I am calling another form on the press of a view button, the called form should display the data corresponding to the ID field in the first form. I want the second form to be readonly. I am using the below code
Private Sub cmdView_Click()
strLinkCriteria = "[Request ID] = Forms![Form1]![subform]![Request ID]"
DoCmd.OpenForm "Form2", , , strLinkCriteria
DoCmd.MoveSize (1440 * 0.1), (1440 * 0.1)
Forms![Form2].Form.RecordsetType = 2
End Sub
But when i press the view button, it always fetches the first row of the table. And the form is read only. If i remove the line Forms![Form2].Form.RecordsetType = 2, then the record is displayed correctly but its editable.
Please let me know how to go about it.
Regards,
Monica