Results 1 to 8 of 8
  1. #1
    Join Date
    May 2002
    Posts
    395

    Angry Unanswered: Re: how I can refresh database window?

    Hi everyone,

    I am trying to refresh database window through code with the following code:
    Set cBars = Application.CommandBars
    Set cBarCtl = cBars.FindControl(msoControlButton, 3812)
    If Not cBarCtl Is Nothing Then
    cBarCtl.Execute
    End If

    BUT I received this Error mess:
    Method ‘Execute’ of object ‘_commandBarButton’ failed

    ERROR occurred here --> cBarCtl.Execute

    Does anyone know how I can fix this or another way to refresh database window? I tried using RefreshDatabaseWindow method it doesn't work ACC2K.

    Thanks!!

  2. #2
    Join Date
    Jun 2004
    Posts
    92
    Do you mean a form? That would be Refresh or form.refresh.

  3. #3
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    are you coding a wizard or something? why do you need to refresh database window?
    Last edited by ghozy; 09-20-04 at 16:47. Reason: typo
    ghozy.

  4. #4
    Join Date
    Nov 2003
    Posts
    1,487
    Me.Refresh



  5. #5
    Join Date
    May 2002
    Posts
    395

    RE: How I can refresh database window?

    Thanks for your replies.

    I created a table in code to temporary store the results from two queries and this 'temp' table is use as form's recordsource. But I need to delete this table when the form is being closed. Everything works just fine except I can't delete this table. I just can't find a way to refresh the database window so the table will be visible. I keep getting the error message it can't find the table.

    In Acc97 the code is
    Application.RefreshDatabaseWindow

    That is exactly what I need but it won't work in Acc2K.
    Is there something equivalent?
    Doesn't anyone know if refreshing the link to the table will it refresh the database window & how I can write it?

    Thanks!!

  6. #6
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    you can delete any table with sql command drop. you don't need to go through menu or something.

    DoCmd.RunSQL "DROP TABLE TableNamehere"

    maybe if you add your database we could help?
    Last edited by ghozy; 09-20-04 at 17:20. Reason: additon
    ghozy.

  7. #7
    Join Date
    May 2002
    Posts
    395

    Re: How I can refresh database window?

    Thank you, it works!
    Thank you,.....

  8. #8
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    no problem .
    ghozy.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •