Hey folks,
I have a form that I have built for data entry. It is tied to a table that is pre-loaded with some data. The data entry person will enter the rest of the data through the form. The data is for construction on a square piece of land that is divided into different sections. Each section of that land gets a record in the table to describe the data about that piece of land. There are 2 sections of the form. The first section enters data of that land before the construction begins and the second section describes data of that land when it is reclaimed after construction after construction has taken place. (i.e. after a number of years, the buildings that will be constructed will be torn down and the land will be reclaimed to the way it once was....or best effort)
I have the following fields:
Section 1: Data before construction
PRE_SOIL is a pre-populated text field. Each record has a value. (It's the soil type of that peice of land)
PRE_VEG is an empty text field. The data entry person will enter a value for each record. No record will be null. (It's a vegetation descriptor for that piece of land)
PRE_TERR_UNIT is an empty text field. It will be populated by concatenating PRE_SOIL and PRE_VEG.
Section2: Data after land has been reclaimed:
POST_SOIL is an empty text field. Each record has a value.
POST_VEG is an empty text field. The data entry person will enter a value for each record. No record will be null.
POST_TERR_UNIT is an emtpy text field. It will be populated by concatenating POST_SOIL and POST_VEG.
A field to describe the type of construction taken place (i.e. a house, a garage, a driveway, etc):
DEV_AREA is a pre-populated text field. Each record has either a value or is null.
So, the data entry person enters values into PRE_VEG, POST_SOIL, POST_VEG. PRE_TERR_UNIT and POST_TERR_UNIT is automatically concatenated from their respective SOIL and VEG fields.
There is a rule. The rule is that if the land area record does not contain any construction (i.e. The null records in DEV_AREA), then the values for Section 2 will remain the same as the respective values from section 1 (i.e. the POST_SOIL will be the same as PRE_SOIL).
I want to automatically update those fields using a VBA event script. Given that any blank record in DEV_AREA means that no construction will take place on that land record, I know I can script this. I'm not sure which event will do this for me. Can anyone suggest something?
It's going to go something like:
Code:
If Me.DEV_AREA = "" then
Me.POST_SOIL = Me.PRE_SOIL
Me.POST_VEG = Me.PRE_VEG
Thanks,
Mike