My users are able to toggle between form view and datasheet view. I don't want them to be able to edit data when they are in datasheet view, so I have coded the onload event of the datasheet form with
The problem is I don't know what I need to put into the HandleKeyDown function in order to force the textboxes to ignore keyboard input.Code:Dim ctl As Control For Each ctl In Me If ctl.ControlType = acTextBox Then ctl.OnKeyDown = "=HandleKeyDown()" End If Next ctl