Results 1 to 2 of 2
  1. #1
    ozzy is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    8

    to requery comboboxes in different two form link to a single data entry form

    Hello,

    My problem is to requery comboboxes in different two form link to a single data entry form. to be specific;
    I have two forms and two comboboxes in them and next to comboboxes i placed buttons to open data entry form

    FrmComponentsDataEntry
    -> cboReusability
    -> btnReusability
    FrmEquipmentDataEntry
    -> cboReusabilityEquipment
    -> btnReusabilityEquipment



    these comboboxes are feed from same form "FrmReXabilityDataEntry" . I used this code to requery combobox after adding new record to "FrmReXabilityDataEntry" for the first form "FrmComponentsDataEntry".

    Private Sub Form_Close()
    Forms!FrmComponentsDataEntry.[cboReusability].Requery
    End Sub

    to requery second form i added this code under

    Forms!FrmEquipmentDataEntry.[cboReusabilityEquipment].Requery

    but when i edit in second form macro gives error naturally and says access cannot find FrmComponentsDataEntry , because first form is not open.

    What kind of code should i use? so that macro requery only comboboxes in open form. FYI i am not good at coding yet
    (actually code requery the fileds but may be i should use error handling or smth..?)

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You could use error handling, but personally I'd use IsLoaded to test that the form is loaded before requerying.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 04-22-2014, 01:23 PM
  2. Replies: 5
    Last Post: 03-09-2014, 07:16 PM
  3. Create LINK/LOOK UP in data entry form
    By marcvanderpeet12 in forum Forms
    Replies: 1
    Last Post: 08-08-2013, 07:44 AM
  4. Form for new data entry which link to another table
    By marcvanderpeet12 in forum Forms
    Replies: 3
    Last Post: 06-12-2013, 09:47 PM
  5. Replies: 6
    Last Post: 07-21-2010, 05:25 PM

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