R
roneyc
I am trying to modify an existing database for which the developer is
not available and I'm new to VBA. I have some basic questions to try to
understand the object-VBA relationships before I even begin to start
editing.
The situation: Database consists of 10 tables. A master form exists,
with 8 tabbed controls and 16 subforms. These are essentially 2 sets of
8, one for editing and viewing existing records and another complete
set to add a new record. When in design view, I click on the event
procedure in properties, the VBA view opens up pointing to a private
subroutine in the middle of several pages of code.
Questions:
1. Will there be separate pages of code for each subform, or do these
pages represent all the code for the database?
2. If this code is only attributable to the single subform I am trying
to modify, how do I determine the function of the other subroutines not
part of the Event Procedure?
3. If this code is for other subforms and controls throughout the
database, is there a way to point backwards to the objects linked to
different subroutines?
These questions arise because viewing the VBA code from several of the
different subforms shows the pages of code are not an exact match.
There is probably 75% overlap on the subroutines from form to form, but
each collection of code is slightly different in the subroutines it
contains. I'm wondering if the developer had some different versions
and there could be some outdated VBA that doesn't apply to any of the
current objects, reports, etc. If so, I'd like to simplifly by deleting
extraneous code, but without knowing what it might be linked to, I
don't want to proceed.
not available and I'm new to VBA. I have some basic questions to try to
understand the object-VBA relationships before I even begin to start
editing.
The situation: Database consists of 10 tables. A master form exists,
with 8 tabbed controls and 16 subforms. These are essentially 2 sets of
8, one for editing and viewing existing records and another complete
set to add a new record. When in design view, I click on the event
procedure in properties, the VBA view opens up pointing to a private
subroutine in the middle of several pages of code.
Questions:
1. Will there be separate pages of code for each subform, or do these
pages represent all the code for the database?
2. If this code is only attributable to the single subform I am trying
to modify, how do I determine the function of the other subroutines not
part of the Event Procedure?
3. If this code is for other subforms and controls throughout the
database, is there a way to point backwards to the objects linked to
different subroutines?
These questions arise because viewing the VBA code from several of the
different subforms shows the pages of code are not an exact match.
There is probably 75% overlap on the subroutines from form to form, but
each collection of code is slightly different in the subroutines it
contains. I'm wondering if the developer had some different versions
and there could be some outdated VBA that doesn't apply to any of the
current objects, reports, etc. If so, I'd like to simplifly by deleting
extraneous code, but without knowing what it might be linked to, I
don't want to proceed.