TINA: Requested Code - Option Box Problem

  • Thread starter Thread starter norbert.beliso
  • Start date Start date
N

norbert.beliso

Heres code for this problem.
First 2 are Options 1 & 2
Third one below is after combo box is activated.


Private Sub opt_OneMonth_GotFocus()
Me.cbo_Months_Reports.Enabled = True
MsgBox "Please select desired month from dropdown
box", , "Got Month?"
Me.cbo_Months_Reports.SetFocus
Me.cbo_Months_Reports.Dropdown
End Sub

Private Sub opt_AllMonths_GotFocus()
Dim strResponse As String

' strResponse = MsgBox("Changing Month Selection
requires refreshing tables & queries. This will take
approximately one minute.", vbOKCancel, "Refresh Tables")
' If strResponse = vbOK Then
' Call DeleteTables_Listboxes
' Me.cbo_Months_Reports.Enabled = False
' DoCmd.RunMacro ("mac_Totals_Revenue")
' MsgBox "Refresh Completed.", , "Done!"
' Else
' End If

End Sub

Private Sub cbo_Months_Reports_AfterUpdate()
Dim strResponse As String

strResponse = MsgBox("Changing Month Selection
requires refreshing tables & queries. This will take
approximately 1-2 minutes.", vbOKCancel, "Refresh Tables")

If strResponse = vbOK Then
Me.txt_StoreMonthValue.DefaultValue = "1"
Call DeleteTables_Listboxes
DoCmd.RunMacro ("mac_ListBoxQueries_OneMonth")
MsgBox "Refresh Completed.", , "Done!"

Else
End If

End Sub
 
well, i didn't see any apparent error in the code. may
have something to do with your form "flow", since you're
using GotFocus to trigger the code. have you tried putting
the option controls in an option group and running the
code from the OnClick event? or even using the OnClick
event in the individual option controls instead of
GotFocus?
 
Back
Top