Heatshiver
Registered User.
- Local time
- Tomorrow, 05:05
- Joined
- Dec 23, 2011
- Messages
- 263
Issue: I've been using Allen Browne's code, and it has been working well until now. When the code runs it produces no Access errors and seems like it works fine; but on closer inspection one of my subforms is not having its values copied over...
Insight: I have a main form with tabs that have subforms. Each subform is copied over to the new record when you insert a date and click a checkbox. For all the other subforms, this works great. But on the last subform the issue above is now occurring.
Special: The only things special about the subform is that it is actually two subforms under the specified tab (but not one subform within a subform). When a person clicks the next/last page button on the main form the RecordSource of both subforms switch to two other queries. In total, there are 4 tables being used, but only 2 at one time when the main form is in Form View.
Coding: I have a bit of simple extra coding in Browne's coding such as enabling/disabling the the next/last buttons, a refresh, save, etc., all of which occur after Browne's code has implemented. I do have RecordSource switches for the subforms in Browne's code. These occur before, between, and after the coding for the 4 tables of the subforms to be copied:
BEFORE - The reason for this is so that if the RecordSource is on the wrong queries on the Form View it will change to the correct two before copying commences.
BETWEEN - This is to switch to the next two queries.
AFTER - This will change back to the first two queries.
Things I've Tried:
1) Commenting out all extra coding not part of Browne's coding, including RecordSource changes.
2) All of #1 with the inclusion of taking out the subform copy values for tables 2-4 (first table left to check if it will work alone).
3) I tried deleting all other subform copy value codes except for the 4 in question.
4) I tried lessening the code of some of the subform copy values in question.
5) I tried lessening the code of the other subform copy values.
6) I tried placing the code into a VBA module in case there was too much information (as there is a lot) and it just wasn't giving an error saying so.
Things I've Checked:
1) Checked the 4 tables for any values that may have carried over. The new record is always made, but no values are present.
2) Checked Parent/Child relationships, and all are as needed.
3) Checked relationships and all are connected. These 4 tables are connected to an intermediate table (consisting of just a Primary and Foreign key) that connects to the primary table.
4) Checked any coding that relates to the table from the subforms or main form, all seems to be working properly and not impeding on Browne's code.
I have the feeling that the need to change the RecordSources has something to do with it, but even not doing so has not been fruitful in fixing this... Any help, recommendations, advice, etc. would be much appreciated!
Insight: I have a main form with tabs that have subforms. Each subform is copied over to the new record when you insert a date and click a checkbox. For all the other subforms, this works great. But on the last subform the issue above is now occurring.
Special: The only things special about the subform is that it is actually two subforms under the specified tab (but not one subform within a subform). When a person clicks the next/last page button on the main form the RecordSource of both subforms switch to two other queries. In total, there are 4 tables being used, but only 2 at one time when the main form is in Form View.
Coding: I have a bit of simple extra coding in Browne's coding such as enabling/disabling the the next/last buttons, a refresh, save, etc., all of which occur after Browne's code has implemented. I do have RecordSource switches for the subforms in Browne's code. These occur before, between, and after the coding for the 4 tables of the subforms to be copied:
BEFORE - The reason for this is so that if the RecordSource is on the wrong queries on the Form View it will change to the correct two before copying commences.
BETWEEN - This is to switch to the next two queries.
AFTER - This will change back to the first two queries.
Things I've Tried:
1) Commenting out all extra coding not part of Browne's coding, including RecordSource changes.
2) All of #1 with the inclusion of taking out the subform copy values for tables 2-4 (first table left to check if it will work alone).
3) I tried deleting all other subform copy value codes except for the 4 in question.
4) I tried lessening the code of some of the subform copy values in question.
5) I tried lessening the code of the other subform copy values.
6) I tried placing the code into a VBA module in case there was too much information (as there is a lot) and it just wasn't giving an error saying so.
Things I've Checked:
1) Checked the 4 tables for any values that may have carried over. The new record is always made, but no values are present.
2) Checked Parent/Child relationships, and all are as needed.
3) Checked relationships and all are connected. These 4 tables are connected to an intermediate table (consisting of just a Primary and Foreign key) that connects to the primary table.
4) Checked any coding that relates to the table from the subforms or main form, all seems to be working properly and not impeding on Browne's code.
I have the feeling that the need to change the RecordSources has something to do with it, but even not doing so has not been fruitful in fixing this... Any help, recommendations, advice, etc. would be much appreciated!