Results 1 to 2 of 2
  1. #1
    nkenney is offline Advanced Beginner
    Windows 2K Access 2007
    Join Date
    Mar 2009
    Posts
    40

    Syncing up subform

    I am having a problem on a subform…..

    Here are the fields are:


    • ItemCombo (unbound)
    • Description (unbound)
    • Price (unbound)
    • Id (hidden) (Table Field)
    • Item Code (Table Field)
    Okay here is where I am….I am inputting data in this subform. The user will select a value from the ItemCombo. I then execute the following code:


    Private Sub ItemCode_Change()
    Description = DLookup("[Description ]", "Item Code", "[ID] = " & Me!ItemCode)
    Part = DLookup("[Part ]", "Item Code", "[ID] = " & Me!ItemCode)
    Price = DLookup("[Price ]", "Item Code", "[ID] = " & Me!ItemCode)
    End Sub

    Right now I get something like this if I were to enter 3 rows of data:

    ItemCombo Description Price ID Item Code
    Item1 Descripton3 12.33 1 Item1 (Should Be Description 1 12.31)
    Item2 Descripton3 12.33 2 Item2 (Should Be Description 2 12.32)
    Item3 Descripton3 12.33 3 Item3 (Should Be Description 3 12.33)

    How do I get the Description and price to match the item combo field?
    Thanks!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    In order for a control to have a unique value in a continuous form it needs to be bound to a field in the RecordSource of the form.

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

Similar Threads

  1. Replies: 3
    Last Post: 01-05-2010, 10:07 PM
  2. Syncing Quickbooks and Access
    By nomij in forum Import/Export Data
    Replies: 0
    Last Post: 08-22-2008, 07:01 AM
  3. Replies: 1
    Last Post: 12-10-2005, 04:52 PM
  4. Subform in a Subform and relationships
    By St3ph3n in forum Database Design
    Replies: 3
    Last Post: 12-06-2005, 06:34 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