Results 1 to 6 of 6
  1. #1
    marrpis is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    4

    Problem with Access Form

    Well this is a little complicated.



    My table is called Maintenance_Fees and has the following fields (SB_ID, Member_ID,ML_Last_Name1, ML_FirstName1, Year_1994....Year_2025(numeric fields)

    and what i tried to do in the form, was to connect the fields
    SB_ID, Member_ID, ML_Last_Name1 and ML_FirstName1 with the fields to another table "Members_List" so it would be autofilled after i chose the SB_ID, which i did with After Update Event

    Member_ID = DLookup("Member_ID", "Members_List", "SB_ID=" & SB_ID)

    ML_Last_Name1 = DLookup("ML_Last_Name1", "Members_List", "SB_ID=" & SB_ID)

    ML_First_Name1 = DLookup("ML_First_Name1", "Members_List", "SB_ID=" & SB_ID)

    The problem is that when i choose one SB_ID member, then it just autocompletes the fields i said, but the other fields i have are always the same...

    How can i connect all the fields? Or do I have to do it another way? I want when the all the fields to be updated automatically

    HELP AND THANKS...

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Should not be saving the names in Maintenance_Fees, only the Member_ID. Use a query to join the tables when you want to view other info from related records. This is major principle of relational database - don't duplicate data.

    Where are you using the DLookups? In textboxes on form?
    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
    marrpis is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    4
    I use DLOOKUP in Maintentace_Fee Form

  4. #4
    marrpis is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    4
    I haven't also defined that : SB_ID, Member_ID, ML_LastName1 & ML_FirstName1 are in my primary table Members_List and SB_ID is the Primary Key there.

    I haven't ever used a query to relate forms but i will try.

  5. #5
    marrpis is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    4
    Sorry the answer to the question is that i have made a combo box for SB_ID in the form where i use DLookUP

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    The DLookups are not best approach. Combobox should not have a DLookup anyway.

    Member_ID should be a multi-column combobox with a RowSource that has columns for the ID and name, like:

    SELECT Member_ID, ML_Last_Name1 & ", " & ML_FirstName1 As MemeberName FROM Members_List;

    Then set combobox properties:
    ColumnCount: 2
    ColumnWidths: 0";2"
    BoundColumn: 1
    ControlSource: Member_ID

    Review tutorials at http://datapigtechnologies.com/AccessMain.htm especially the 3 on comboboxes in the Access Forms: Control Basics section.
    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.

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

Similar Threads

  1. Replies: 6
    Last Post: 02-18-2012, 07:20 AM
  2. Replies: 0
    Last Post: 09-16-2011, 04:42 PM
  3. Access Form VBA problem
    By jysharp2003 in forum Forms
    Replies: 6
    Last Post: 09-18-2010, 01:02 PM
  4. Replies: 2
    Last Post: 06-14-2010, 03:25 PM
  5. Outlook Form to Access problem
    By bearsgone in forum Import/Export Data
    Replies: 1
    Last Post: 02-04-2010, 11:14 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