frankbutcher
Registered User.
- Local time
- Today, 10:06
- Joined
- Aug 6, 2004
- Messages
- 192
Hi
I have a button on a form, which updates the numnbers of records in 4 tables.
When the button is clicked, it deletes all records in the tables, and then adds the records back in from another table that is linked.
Part of the code is below:-
----
Dim stDocName1 As String
stDocName1 = "Delete_LabourHours"
DoCmd.OpenQuery stDocName1, acNormal, acEdit
Dim stDocName4 As String
stDocName4 = "Append_LabourHours"
DoCmd.OpenQuery stDocName4, acNormal, acEdit
Dim stDocName2 As String
stDocName2 = "Delete_MOF"
DoCmd.OpenQuery stDocName2, acNormal, acEdit
Dim stDocName5 As String
stDocName5 = "Append_MOF"
DoCmd.OpenQuery stDocName5, acNormal, acEdit
Dim stDocName3 As String
stDocName3 = "Delete_POR"
DoCmd.OpenQuery stDocName3, acNormal, acEdit
Dim stDocName6 As String
stDocName6 = "Append_POR"
DoCmd.OpenQuery stDocName6, acNormal, acEdit
Dim stDocName7 As String
stDocName7 = "Delete_MaterialList"
DoCmd.OpenQuery stDocName7, acNormal, acEdit
Dim stDocName8 As String
stDocName8 = "Append_MaterialList"
DoCmd.OpenQuery stDocName8, acNormal, acEdit
----
This all works fine, but I would like to have a form open when the above operations have completed to list the amount of new entries were added for each table. i.e
2 entries for added under Labour Hours
4 entries for added under MOF
etc etc....
Can anyone point me in the right direction? I can add up the amount of entries, but not sure how I get the number of previous entries before deletion....if that makes sense!
Thanks in advance.
Frank.
I have a button on a form, which updates the numnbers of records in 4 tables.
When the button is clicked, it deletes all records in the tables, and then adds the records back in from another table that is linked.
Part of the code is below:-
----
Dim stDocName1 As String
stDocName1 = "Delete_LabourHours"
DoCmd.OpenQuery stDocName1, acNormal, acEdit
Dim stDocName4 As String
stDocName4 = "Append_LabourHours"
DoCmd.OpenQuery stDocName4, acNormal, acEdit
Dim stDocName2 As String
stDocName2 = "Delete_MOF"
DoCmd.OpenQuery stDocName2, acNormal, acEdit
Dim stDocName5 As String
stDocName5 = "Append_MOF"
DoCmd.OpenQuery stDocName5, acNormal, acEdit
Dim stDocName3 As String
stDocName3 = "Delete_POR"
DoCmd.OpenQuery stDocName3, acNormal, acEdit
Dim stDocName6 As String
stDocName6 = "Append_POR"
DoCmd.OpenQuery stDocName6, acNormal, acEdit
Dim stDocName7 As String
stDocName7 = "Delete_MaterialList"
DoCmd.OpenQuery stDocName7, acNormal, acEdit
Dim stDocName8 As String
stDocName8 = "Append_MaterialList"
DoCmd.OpenQuery stDocName8, acNormal, acEdit
----
This all works fine, but I would like to have a form open when the above operations have completed to list the amount of new entries were added for each table. i.e
2 entries for added under Labour Hours
4 entries for added under MOF
etc etc....
Can anyone point me in the right direction? I can add up the amount of entries, but not sure how I get the number of previous entries before deletion....if that makes sense!
Thanks in advance.
Frank.