Hello,
I have some specification sheets with subforms I have created. I'm having a problem where if you right click and filter/sort any field in the subform (which is tied to the main form in a 1:1 relationship), then the subform only displays the first record. This ends up permanently altering the spec sheet. I notice that when this happens, text typically shows up in the "Order By" or "Filter" fields of the subform. My only resort is to delete the broken spec sheet and subform and then reimport them from a backup version of the database.
Is there some way to prevent the user from filtering/sorting fields in the subform? I tried setting the "Allow Filters" property of the subform to false but this does not fix it since users can still right click and sort. The only thing I can think of is preventing users from right clicking on controls in general, but then they can no longer right click on any of the other forms (where filtering and sorting is important) which is not preferred. Any suggestions?
For some background, here is the layout:
Form <Form Main Body>
RecordSource = qryI^^INSTRUMEN T_BASE
(User navigates through records on the main form)
Form <Linked Subform>
RecordSource = qryI^^INSTRUMEN T_HEADER
Link Master = INSTRUMENTID
Link Child = Instr2Body
(Not allowed to navigate through records in the subform due to 1:1 relationship)
Query <qryI^^INSTRUME NT_BASE>
[INSTR-INDEX_HEADER] Type 1 joined with [INSTR-INDEX_BASE], [Instr2Body]-[INSTRUMENTID]
Query <qryI^^INSTRUME NT_HEADER>
[INSTR-INDEX_BASE]
Table [INSTR-INDEX_HEADER]
[Instr2Body] - Primary Key, integer
Table [INSTR-INDEX_BASE]
[INSTRUMENTID] - Primary Key, integer
Macros run when the instrument (Instr2Body) is selected in the header, which simultaneously fills in a hidden control box for INSTRUMENTID then refreshes the form to create the specification sheet. All controls in the body section are disabled if the spec sheet is new to prevent creating the spec sheet in the wrong location.
Thanks in advance for the help.
I have some specification sheets with subforms I have created. I'm having a problem where if you right click and filter/sort any field in the subform (which is tied to the main form in a 1:1 relationship), then the subform only displays the first record. This ends up permanently altering the spec sheet. I notice that when this happens, text typically shows up in the "Order By" or "Filter" fields of the subform. My only resort is to delete the broken spec sheet and subform and then reimport them from a backup version of the database.
Is there some way to prevent the user from filtering/sorting fields in the subform? I tried setting the "Allow Filters" property of the subform to false but this does not fix it since users can still right click and sort. The only thing I can think of is preventing users from right clicking on controls in general, but then they can no longer right click on any of the other forms (where filtering and sorting is important) which is not preferred. Any suggestions?
For some background, here is the layout:
Form <Form Main Body>
RecordSource = qryI^^INSTRUMEN T_BASE
(User navigates through records on the main form)
Form <Linked Subform>
RecordSource = qryI^^INSTRUMEN T_HEADER
Link Master = INSTRUMENTID
Link Child = Instr2Body
(Not allowed to navigate through records in the subform due to 1:1 relationship)
Query <qryI^^INSTRUME NT_BASE>
[INSTR-INDEX_HEADER] Type 1 joined with [INSTR-INDEX_BASE], [Instr2Body]-[INSTRUMENTID]
Query <qryI^^INSTRUME NT_HEADER>
[INSTR-INDEX_BASE]
Table [INSTR-INDEX_HEADER]
[Instr2Body] - Primary Key, integer
Table [INSTR-INDEX_BASE]
[INSTRUMENTID] - Primary Key, integer
Macros run when the instrument (Instr2Body) is selected in the header, which simultaneously fills in a hidden control box for INSTRUMENTID then refreshes the form to create the specification sheet. All controls in the body section are disabled if the spec sheet is new to prevent creating the spec sheet in the wrong location.
Thanks in advance for the help.
Comment