Can anyone explain the reason for the following events. I have a formset containing 3 forms layered one on top of another. Each form is linked to a view and the views are linked in a grandmother, mother, daughter one to many relationship. Each form has two buttons [New/Save] and [Close/Cancel] and several text boxes displaying fields from the appropriate view. The mother and daughter forms have a read only, text box showing the key field in the parent view. The click event of the [New] button of each form contains almost identical code as shown below:
IF THISFORM.cmdNew.Caption = "New"
* Add new record routine
THISFORM.cmdNew.Caption = "Save"
THISFORM.cmdClose.Caption ="Cancel"
* Change button captions
THISFORMSET.frm19bDetails.lst19b.Enabled = .F.
* Disable record selection list
THISFORMSET.nextid("Sctn19b", "b19_id", "B","b19_id"
* Method to generate unique ID for new record
mRecPoint = RECNO()
* Marker variable for current record pointer position
APPEND BLANK IN vSctn19b
* Append blank record
THISFORMSET.frm19bDetails.Refresh
* Refresh the form
AddEdit = 1
* Set Browse/Add/Edit mode marker variable to Add(1)
When the formset is activated forms 2 & 3 have their visible property set to False. The grandmother and mother forms contain a list box which is used to select the appropriate record before moving to the next form. The data is then filtered in the mother and daughter views to show only related records. They also have a button which disables the parent form, makes the next form visible and selects the appropriate view.
When the [New] button is clicked in forms 1 & 3 the user is presented with empty controls to enter an new record. In form 2 however, text boxes and buttons become invisible and only become visible when the user clicks in the appropriate location. Text boxes on the form which are disabled because they only show reference data cannot be revealed by this process. Event tracking for each form shows the sequence of events leading up to this situation to be the same as shown below:
33995.059, formset.frm19bdetails.cmdnew.Click()
33995.279, formset.frm19bdetails.cmdnew.LostFocus()
33995.279, formset.frm19bdetails.LostFocus()
33995.289, formset.frm19bdetails.Deactivate()
33995.289, formset.Deactivate()
33995.319, formset.frm19bdetails.Paint()
I cannot see why this is happening. Any help you can give me would be most gratefully received.
IF THISFORM.cmdNew.Caption = "New"
* Add new record routine
THISFORM.cmdNew.Caption = "Save"
THISFORM.cmdClose.Caption ="Cancel"
* Change button captions
THISFORMSET.frm19bDetails.lst19b.Enabled = .F.
* Disable record selection list
THISFORMSET.nextid("Sctn19b", "b19_id", "B","b19_id"
* Method to generate unique ID for new record
mRecPoint = RECNO()
* Marker variable for current record pointer position
APPEND BLANK IN vSctn19b
* Append blank record
THISFORMSET.frm19bDetails.Refresh
* Refresh the form
AddEdit = 1
* Set Browse/Add/Edit mode marker variable to Add(1)
When the formset is activated forms 2 & 3 have their visible property set to False. The grandmother and mother forms contain a list box which is used to select the appropriate record before moving to the next form. The data is then filtered in the mother and daughter views to show only related records. They also have a button which disables the parent form, makes the next form visible and selects the appropriate view.
When the [New] button is clicked in forms 1 & 3 the user is presented with empty controls to enter an new record. In form 2 however, text boxes and buttons become invisible and only become visible when the user clicks in the appropriate location. Text boxes on the form which are disabled because they only show reference data cannot be revealed by this process. Event tracking for each form shows the sequence of events leading up to this situation to be the same as shown below:
33995.059, formset.frm19bdetails.cmdnew.Click()
33995.279, formset.frm19bdetails.cmdnew.LostFocus()
33995.279, formset.frm19bdetails.LostFocus()
33995.289, formset.frm19bdetails.Deactivate()
33995.289, formset.Deactivate()
33995.319, formset.frm19bdetails.Paint()
I cannot see why this is happening. Any help you can give me would be most gratefully received.