Thanks but I get error at:
Me.AFRsParts.Form.AllowEdits = False
Thanks but I get error at:
Me.AFRsParts.Form.AllowEdits = False
As about displaying only certain records by some criterion, then I have a devices database, where in devices table is calculated field (UL - UserLevel) which contains structured integer value for every device.
E.g. when the device is used in one country, then this field has values from 0 to 10 (values 0 and 1 used in one factory - real people and group users like workstation or department respectively, 2 and 3 in another factory, etc.)
When the device is used in second country, values are from 10 to 19, etc.
Then form 90 and up are values for broken devises, devices sent to repair, free devices, etc. And value 99 is reserved for archived/out of use devices. Btw, all those statuses are defined as users.
The Main form is unbound, and the form for device management is a subform in it. A combo box in main form allows to set various filters on subform, like:
All active devices - UL<99
All devices from certain country - like UL between 0 And 9
All devices from certain factory - like UL between 0 and 1
All active devices not used currently - UL between 90 and 98
All archived devices - UL = 99
And of course you can use this to determine are records editable or not. My main concern is to avoid accidental changes, so all info is always disabled, and only enabled controls are for selecting device, and for enabling editing. And Current event disables any not new record.