Combo Box to filter and Allow Edits

jamesave

Member
Local time
Today, 01:43
Joined
Apr 26, 2020
Messages
30
In Northwind DB frmProductDetail, I try to make the user unable to Edit the data by putting me.allowEdits = False when the form is open

Private Sub Form_Open(Cancel As Integer)
Me.AllowEdits = False
End Sub


This make the combo box cboFindProduct unselectable in form view. What is the best work around so the user can select a field from this combo box but the form still restrict the user from editing?
 
Cycle through the controls on that form and set to Locked to True or Enabled to False.?
If you are going to do this for more than one form, create a function ro enable/disable the controls and pass in the form as an object, and which way to amend.
 
Noted. Thanks for the input! I just create a cmdbutton to toggle for the Edit. It should at least will not allow the user to accidentally edit the values. There should be better way to implement, but it works for now.
 
You could also use it as a subform, and have your form with the search combo?
Probably a better way is to Enable Edits on GotFocus/Enter and Disable Edits on exit of that control?
Then you would need a button to allow Edits and then disable it again?
 

Users who are viewing this thread

Back
Top Bottom