L
LeAnn
Hi
I have an Access 97 database. The main form is an unbound form with a MAIN
list box (unbound also) that gets updated when a user clicks an option on the
left. There are 3 hidden fields (2 listboxes and 1 txt box) that are
populated on the OnLoad and click events of the options users click. The
main list box is updated according to these hidden field values. All works
fine. Now - a user can double click a record displayed in the main list box
to edit the record. The code puts the new form in Dialog mode.
When the user finishes updating the one form and closes it, I want to update
the Main list box. I put the following code into the OnActivate event but it
isn't firing as I found out when tested with a message box. Code:
If Me.lstViewData.Value = "" Then 'lstViewData is the hidden list box
Call UpdateView("qryWBCView")
Else
'Update the lstView properties to display the view appropriately.
With Me.lstViewData 'lstViewData is
the hidden list box
Me.lstView.ColumnCount = CInt(.Column(2, 0)) 'lstView is the main
list box
Me.lstView.BoundColumn = CInt(.Column(4, 0))
Me.lstView.ColumnWidths = .Column(3, 0)
Me.lstView.RowSource = "SELECT * FROM " & .Column(1, 0)
Me.lblView.Caption = .Column(6, 0)
Me.lstWhere.RowSource = .Column(8, 0) & ";0"
End With
End If
Why would the OnActivate not be triggered? Would it have anything to do
with the other form being in Dialog box mode?
Thanks
I have an Access 97 database. The main form is an unbound form with a MAIN
list box (unbound also) that gets updated when a user clicks an option on the
left. There are 3 hidden fields (2 listboxes and 1 txt box) that are
populated on the OnLoad and click events of the options users click. The
main list box is updated according to these hidden field values. All works
fine. Now - a user can double click a record displayed in the main list box
to edit the record. The code puts the new form in Dialog mode.
When the user finishes updating the one form and closes it, I want to update
the Main list box. I put the following code into the OnActivate event but it
isn't firing as I found out when tested with a message box. Code:
If Me.lstViewData.Value = "" Then 'lstViewData is the hidden list box
Call UpdateView("qryWBCView")
Else
'Update the lstView properties to display the view appropriately.
With Me.lstViewData 'lstViewData is
the hidden list box
Me.lstView.ColumnCount = CInt(.Column(2, 0)) 'lstView is the main
list box
Me.lstView.BoundColumn = CInt(.Column(4, 0))
Me.lstView.ColumnWidths = .Column(3, 0)
Me.lstView.RowSource = "SELECT * FROM " & .Column(1, 0)
Me.lblView.Caption = .Column(6, 0)
Me.lstWhere.RowSource = .Column(8, 0) & ";0"
End With
End If
Why would the OnActivate not be triggered? Would it have anything to do
with the other form being in Dialog box mode?
Thanks