Adam McReynolds
Registered User.
- Local time
- Yesterday, 20:17
- Joined
- Aug 6, 2012
- Messages
- 129
A coworker a while ago tested a code on our DB and I deleted the event but forgot to delete the code source in VBA. The weird thing is the system ran fine for months until my boss added a new button. The naming does not match in anyway so we do not know how this orphaned code ran. When we ran the debugger it showed us where the problem was but we are curious as to why when the button was added that it finally crashed. Any help would be awesome.
Here is the code my coworker put in:
Private Sub Combo387_BeforeUpdate(Cancel As Integer)
x = 1
Do
x
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Loop Until x = Text390
End Sub
Here is the Macro to the button my boss put in (button name command187 for OpenReport):
rpt_Module_Repairs_TW_Study, Print Preview, , , Normal
My boss is nervous that we may have reached some sort of capacity for Access or VBA code?
Here is the code my coworker put in:
Private Sub Combo387_BeforeUpdate(Cancel As Integer)
x = 1
Do
x
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Loop Until x = Text390
End Sub
Here is the Macro to the button my boss put in (button name command187 for OpenReport):
rpt_Module_Repairs_TW_Study, Print Preview, , , Normal
My boss is nervous that we may have reached some sort of capacity for Access or VBA code?