Refresh not available!!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Omar Anwar
    New Member
    • Jul 2006
    • 15

    #1

    Refresh not available!!!

    Hi.
    I am using form and subform in which form has combo boxes that sets the criteria for the query. i am using grouping in the select query and the contents of the query are displayed in the subform. as soon as i set the criteria in the query, the contents of the query are not displayed in the subform and the refresh button genrats the error statement "The Command or Action 'Refresh' isn't available now." please tell me the reason of this problem and its solution.
  • beat1078
    New Member
    • Jul 2006
    • 16

    #2
    I used this snip of code for a similar problem I was having.
    On the event for before your subform should populate the data, call this public sub.
    Make sure you change my form name to your object name.

    Public Sub RequeryList()
    'This was copied from the HELP section of MS Access
    'It makes the list box refresh the information based on the
    'selection made in the combo box

    Dim ctlCombo As Control

    ' Return Control object pointing to a combo box.
    Set ctlCombo = Forms!frmSectio nSelect!lstPara Info

    ' Requery source of data for list box.
    ctlCombo.Requer y

    End Sub

    Comment

    Working...