Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2008
    Location
    Ohio
    Posts
    3

    Unanswered: Subform in a secured database

    I have a secured database where you launch a form from the switchboard. The switchboard command is #3 (2=Open Form in Add Mode, 3=Open Form in Edit Mode) because the user doesn't add the record that is the source of the form but needs to add records to the subform.

    Form "Edit CAM"
    -Source: (Table) Master
    -Fields:
    /ID: 101
    /Name: Bessie P. Smith
    /Account1: 99999999999
    /Account2: 88888888888


    Subform "GL1"
    -Source: (Table) GL Data
    -Fields:
    /ID: 1
    /MasterID: 101
    /GLID: 5
    /Amount: $1250.12
    /Account: 99999999999

    So on the "Edit CAM" form I will pull up record #101 and view that data. On the subform I want to see corresponding information from "GL1" and be able to enter a new GL record as well as view any other entries for that account. The user has security privleges to read, insert & update both tables & the form.

    I hope that is clear & gives enough information.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Ok, so you need to have a form with all controls set to be locked except the subform object
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Mar 2008
    Location
    Ohio
    Posts
    3

    Subform in a secured database

    The subforms are not locked. I believe it has to do with the security. On the switchboard I am telling it to open the form as edit (therefore showing only existing records). The user needs to view existing records of the form but be able to add entries to the subform. Further complicated by if there are existing entries on the subform to view those as well as be able to add ones.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I never use the switchboard, I always use my own menu systems so then I know exactly what is going on.

    Try opening the form without the switchboard and see what results you get... then you will know if it's a form problem or if it really is a problem with the switchboard. If it is your switchboard that is the source of the problem then you can focus down on what options you have there.

    What version of Access are you running? I can try checking out the switchboard later if you like.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    The switchboard (in my opinion) is a good tutorial but not a good technique. It populates the fields on your "Main" form with values from a table and then launches what code should be done when that item is selected. It's more confusion and complication than what a good switchboard type form would do which is....
    1. You simply make a modal, popup form.
    2. You add some buttons (and/or) text next to those buttons or text on the buttons.
    3. You program in the events of the OnClick of each of the button.

    To me, it's just unneccessarily complicated to have a switchform based on a table and manage it like that verses just adding a new button onto the form.

    I might recommend you try doing a simple modal, popup form and add a few buttons and put events (OnClick) of those buttons to do what you want it to do (similar as when you would click on that in the switchboard.)

    Switchboards always seem problematic for the simple task their supposed to do. There's some very good examples of "Main" menu type forms which mimick a switchboard in the code bank. You may want to check them out.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    100% Agreed with ya there
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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