Requery in Place: How to Requery a Continuous Form in Microsoft Access Without the Focus Moving

Поділитися
Вставка
  • Опубліковано 19 вер 2024

КОМЕНТАРІ • 34

  • @navisalomi
    @navisalomi Рік тому +2

    Nothing is sweeter than one line of code to replace multiple lines.
    My way of doing this was to save the bookmark, requery the form and then restore the bookmark.
    This is way better and less code.
    Better to just create a function all together and reuse.
    Function requery_in_place(form_name as string)
    Forms!form_name.recordset.requery
    End Function
    And then invoke/call the function in the form as:
    requery_in_place(me.name) or outside the form as:
    requery_in_place(form_name)
    Thanks so much for sharing ❤.

    • @599CD
      @599CD  Рік тому

      Yeah, i've never been a fan of bookmarks

  • @robertodc62
    @robertodc62 3 місяці тому

    Richard i learn a lot with your videos, thank you men, i am a super fan

  • @sager014
    @sager014 Рік тому +1

    Thanks Rick for the useful tips.
    My way of re-querying CustomerListF form involves the following simple VBA code. Which can be added to the On Close event in the CustomerF form:
    If CurrentProject.AllForms("CustomerListF").IsLoaded Then
    Forms!CustomerListF.Recordset.Requery
    End If
    This way if the CustomerListF is active in the background, it will get requeried. If not, the requery command will not fire.
    Thank you again for the video

    • @navisalomi
      @navisalomi Рік тому

      This is cool. You place the code in the close event of the pop-up form. Thanks for sharing.

    • @599CD
      @599CD  Рік тому

      Yep. I've covered IsLoaded in a few of my Developer videos, and I made a function out of it for my Code Vault. I plan on covering this in a future TechHelp video too.

  • @michael23864
    @michael23864 Рік тому

    Another excellent video Richard I have learnt so much from just tech help videos alone

    • @599CD
      @599CD  Рік тому

      Glad to hear it

  • @InterpretNZ
    @InterpretNZ 8 місяців тому

    I had totally forgotten how to do this! THANK YOU for this video!

    • @599CD
      @599CD  8 місяців тому

      You're welcome welcome

  • @rabidfollower
    @rabidfollower Рік тому

    Excellent tip. This works on datasheets too. If there are tons of records, I may want to requery only if the user actually changed data in the record to improve performance. And that's a bit tricky to do.

  • @xavierbatlle1828
    @xavierbatlle1828 Рік тому

    Thanks, Excellent Tip!
    If you use a Dialog Form, you can also requery the Form after the OpenForm method call.
    Private Sub OpenCustomer()
    If IsNull(CustomerID) Then Exit Sub
    DoCmd.OpenForm "CustomerEditF", , , "CustomerID=" & CustomerID , , acDialog
    Me.Recordset.Requery
    End Sub
    (Only works with a Dialog Form)

  • @tomlarussa8300
    @tomlarussa8300 Рік тому

    Excellent Video!!! Also glad to see you are a fan of both TNG and Rush.

    • @599CD
      @599CD  Рік тому

      Absolutely... my first concert (ever) was Roll the Bones

  • @peteremmanuelololade9184
    @peteremmanuelololade9184 Рік тому

    Pls i need help my form details are not displaying when viewing after queries in ms access I need help.thanks

  • @ourfamilygarden
    @ourfamilygarden Рік тому

    This is great! Never knew it could be so easy. However, it's not working on my forms that are running a passthrough query to SQL server. Is there a way to make it work in this scenario?

    • @599CD
      @599CD  Рік тому

      599cd.com/ask

  • @schwanabdulkareem7782
    @schwanabdulkareem7782 Рік тому

    Very nice and thank you. This unfortunately does not work if your backend is passthrough query based on SQL server sotred procedure.

    • @599CD
      @599CD  Рік тому

      Sounds about right

  • @muhammadasadkhan3466
    @muhammadasadkhan3466 Рік тому

    Does it only work for continuous form? I am trying to requey single form but it doesn’t work. Form is opened on double click event to add options and code is close button of pop form

  • @moodkn
    @moodkn Рік тому

    Very useful layout

  • @balaboopathy1228
    @balaboopathy1228 11 місяців тому

    Great Rost. But instead of a custom form , I just set a flag in the customer detail form.

    • @599CD
      @599CD  11 місяців тому

      Cool beans whatever works for you

  • @abdulhamidalhaddadi2255
    @abdulhamidalhaddadi2255 Рік тому

    Thank you sir

  • @ssdusd
    @ssdusd Рік тому

    Awesome 👌

  • @wirelessg2010
    @wirelessg2010 Рік тому

    I am a Gold Member of your Computer Learning Zone and I need to ask you a question about a problem I am trying to figure out in Access. What is your email address?