Hi,
I'm relatively new to VB and Microsoft Access. I currently have difficulty with the requery function. I'm trying to reload a textareas on the load event of a form. Here is the code
Private Sub Form_Load()
Me.Refresh
DoCmd.Maximize
Me.NoOfRec = Me.lstSearch.ListCount
Me.txtStartDate = Me.txtStartDate2
Me.cmbStartDate.Value = Me.txtStartDate2
Me.cmbEndDate.Value = Date
Me.txtEndDate = Date
Me.lstSearch.Requery
End Sub
This unfortunately doesn't work as it's not maintaining updates when I re-enter the page. Anyone have any ideas here or alternative solutions. The query I am calling is quite complex involving 3-4 tables.
Cheers,
Mark.
I'm relatively new to VB and Microsoft Access. I currently have difficulty with the requery function. I'm trying to reload a textareas on the load event of a form. Here is the code
Private Sub Form_Load()
Me.Refresh
DoCmd.Maximize
Me.NoOfRec = Me.lstSearch.ListCount
Me.txtStartDate = Me.txtStartDate2
Me.cmbStartDate.Value = Me.txtStartDate2
Me.cmbEndDate.Value = Date
Me.txtEndDate = Date
Me.lstSearch.Requery
End Sub
This unfortunately doesn't work as it's not maintaining updates when I re-enter the page. Anyone have any ideas here or alternative solutions. The query I am calling is quite complex involving 3-4 tables.
Cheers,
Mark.