My first post, YAY,
I have a database which is controlled by the date, one one particular Tab I have statistics, since there is so much data to collect, I had to make 6 tables to enter the data, these tables are just an extension of the main table i.e. there is only one record in each table for the current date, they do not collect multiple records for the same date.
img.photobucket.com/albums/v716/Fernargen/stats.jpg
For one day there is over 1440 fields, allot of these are not used but still need to be there.
MY problem: if no data is entered for one table, it does not save and therefore doesn't show up in the report, cause it doesn't show up in the report the totals muck up, since the totals muck up, ALL the totals muck up.
img.photobucket.com/albums/v716/Fernargen/statsreport1.jpg
As long as a user at least clicks on the table, a record for that date is created and it all goes smoothly, what i want and have tried to do, is to make a button that saves the tables \ or creates the records and saves them.
I have tried a few different methods, setting the focus on all of them one after the other, tried changing data (which changed controls (a tick box)) which changed the data but didn't save the record.
Forms![frm_Main]![StatsLG01SubFrm]![use] = "on"
Forms![frm_Main]![StatsLG02SubFrm]![use] = "on"
Forms![frm_Main]![StatsDO01SubFrm]![use] = "on"
Forms![frm_Main]![StatsDO02SubFrm]![use] = "on"
Forms![frm_Main]![StatsPat01SubFrm]![use] = "on"
Forms![frm_Main]![StatsSup01SubFrm]![use] = "on"
Forms![frm_Main]![StatsLG02SubFrm]![01res].SetFocus
DoCmd.Save acTable, "StatsLG02"
Forms![frm_Main]![StatsDO01SubFrm]![01res].SetFocus
Forms![frm_Main]![StatsDO02SubFrm]![01res].SetFocus
Forms![frm_Main]![StatsPat01SubFrm]![01res].SetFocus
Forms![frm_Main]![StatsSup01SubFrm]![01res].SetFocus
[ResTotal].SetFocus
[FATotal].SetFocus
[PATotal].SetFocus
[AMBTotal].SetFocus
[PolTotal].SetFocus
[ShkTotal].SetFocus
[LCTotal].SetFocus
[OthTotal].SetFocus
this is some of the setup for this form which might answer some questions
img.photobucket.com/albums/v716/Fernargen/stats1-2.jpg
Date is the primary key, sub tables have no primary key, don't need them imo, should really be a one to one relationship if thats possible as there is never duplicate records of the date.
All this code does squat. I hope i have explained myself ok here, this has been bugging me for a few months now.
I have a database which is controlled by the date, one one particular Tab I have statistics, since there is so much data to collect, I had to make 6 tables to enter the data, these tables are just an extension of the main table i.e. there is only one record in each table for the current date, they do not collect multiple records for the same date.
img.photobucket.com/albums/v716/Fernargen/stats.jpg
For one day there is over 1440 fields, allot of these are not used but still need to be there.
MY problem: if no data is entered for one table, it does not save and therefore doesn't show up in the report, cause it doesn't show up in the report the totals muck up, since the totals muck up, ALL the totals muck up.
img.photobucket.com/albums/v716/Fernargen/statsreport1.jpg
As long as a user at least clicks on the table, a record for that date is created and it all goes smoothly, what i want and have tried to do, is to make a button that saves the tables \ or creates the records and saves them.
I have tried a few different methods, setting the focus on all of them one after the other, tried changing data (which changed controls (a tick box)) which changed the data but didn't save the record.
Forms![frm_Main]![StatsLG01SubFrm]![use] = "on"
Forms![frm_Main]![StatsLG02SubFrm]![use] = "on"
Forms![frm_Main]![StatsDO01SubFrm]![use] = "on"
Forms![frm_Main]![StatsDO02SubFrm]![use] = "on"
Forms![frm_Main]![StatsPat01SubFrm]![use] = "on"
Forms![frm_Main]![StatsSup01SubFrm]![use] = "on"
Forms![frm_Main]![StatsLG02SubFrm]![01res].SetFocus
DoCmd.Save acTable, "StatsLG02"
Forms![frm_Main]![StatsDO01SubFrm]![01res].SetFocus
Forms![frm_Main]![StatsDO02SubFrm]![01res].SetFocus
Forms![frm_Main]![StatsPat01SubFrm]![01res].SetFocus
Forms![frm_Main]![StatsSup01SubFrm]![01res].SetFocus
[ResTotal].SetFocus
[FATotal].SetFocus
[PATotal].SetFocus
[AMBTotal].SetFocus
[PolTotal].SetFocus
[ShkTotal].SetFocus
[LCTotal].SetFocus
[OthTotal].SetFocus
this is some of the setup for this form which might answer some questions
img.photobucket.com/albums/v716/Fernargen/stats1-2.jpg
Date is the primary key, sub tables have no primary key, don't need them imo, should really be a one to one relationship if thats possible as there is never duplicate records of the date.
All this code does squat. I hope i have explained myself ok here, this has been bugging me for a few months now.