Results 1 to 3 of 3
  1. #1
    swenger is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    151

    DoCmd.Requery

    I have a form with a combo box which looks up info from another table. If the record I am looking up doesn't exist I created an event on double-click of the combo box to open a form which shows the records from the table and create a new record. On the close event of this pop-up form I enetered DoCmd.Requery, however when I close this form I get a message "The command or action 'Requery' isn't available now."

  2. #2
    swenger is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    151
    Perhaps I have the wrong syntax

    Private Sub Close_Click()

    Frm = frmDetails 'Frm was declared as Public already

    DoCmd.Close
    DoCmd.Requery Frm

    End Sub

  3. #3
    swenger is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2016
    Posts
    151
    Figured it out.

    Forms!frmDetails!CustomerCombo.Requery

    I was requering the data source of the table, but should be requerying the combo box.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. AfterUpdate requery does not requery list box
    By ittechguy in forum Programming
    Replies: 5
    Last Post: 09-05-2017, 08:51 AM
  2. Replies: 1
    Last Post: 07-30-2015, 12:56 PM
  3. Replies: 6
    Last Post: 01-27-2015, 02:00 PM
  4. Replies: 10
    Last Post: 03-12-2013, 01:41 PM
  5. Requery?
    By CO711 in forum Forms
    Replies: 0
    Last Post: 08-06-2008, 08:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums