Results 1 to 4 of 4
  1. #1
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393

    Automatically populate combos from one subform to another

    As per the attached database I have a number of forms/ subforms that populate certain tables.

    If you open fromMainMenu and then populate combo boxes and click on add new inspection, it opens frmInspections and then frmEquipment and finally frmChecklist

    with all the data carried through these forms frmChecklist will open with the certain questions required for an equipment checklist (at the moment only 1). This all works well except the user must click on the frmChecklist before the questions are visible/ populated



    When the Equipment is selected from combo box I would like this to populate or be visible automatically (I will add a button for example 'add piece of equipment to inspection')

    Does anyone know how to do this?

    Thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Not really understanding what you want. User clicks into ChecklistID combobox on frmChecklist and makes selection from droplist? Sounds like acceptable behavior.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393
    Yes this is acceptable behaviour and is not a major issue as it is functional however it is not working the way I would like.

    Ideally I want the user after selecting the item from the combo to click a command button that displays the form with the values already visible in the combo boxes for the questions.

    I will not be using datasheet view and want to display multiple questions per page

    I am trying to make frmChecklist not visible and then trying to use code like

    Private Sub cmdOpenChecklist_Click()
    [Forms]![frmInspections]![frmEquipment].[Form]![frmChecklist].[Form].Visible = True
    [Forms]![frmInspections]![frmEquipment].[Form]![frmChecklist].[Form]![txtComment].SetFocus
    End Sub

    However both those lines of code mean that the question combo is not displayed at all, the only way I can get it to display the values is to click on the form

    As I will be putting multiple questions on each page the form must be set to not visible to start with and made visible as it will cover the whole screen and having the questions displayed without having to click on them is also essential

    Thanks

  4. #4
    JFo is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    393
    I figured it out eventually using a macro to make form visible followed by macro gotocontrol

    Thanks anyway

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

Similar Threads

  1. "Automatically" populate UserID & Password for ODBC
    By jgelpi16 in forum Programming
    Replies: 2
    Last Post: 06-02-2011, 11:18 AM
  2. Replies: 5
    Last Post: 05-18-2011, 08:57 AM
  3. Replies: 2
    Last Post: 04-20-2011, 06:59 AM
  4. Subform to automatically take Id
    By joacro in forum Access
    Replies: 3
    Last Post: 03-07-2011, 07:04 AM
  5. Replies: 0
    Last Post: 12-20-2010, 12:35 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