Results 1 to 6 of 6
  1. #1
    revnice is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    61

    Auto-populate form question: again!

    trb5016 helped me out with this but I found I was unable to make the join!

    Either I don't understand what I'm supposed to be doing or I'm in the wrong place.

    I'm trying to make a form that populates all the CUS info as soon as I enter their CUS_ID.

    The two tables (that's all there is) are Customers and Bookings. I want to enter a customer number in the form, have all the cus data auto populate, add the start and end dates and save it to the Bookings table.

    I have the two tables related by primary key. All fields in related tables are 'available' and 'A relationship already exists' if I try to add more relationships.

    When I enter 0006 as the cus_num in the form, I don't get the cus_info from the 6th row of the cus table, instead nothing happens. The data from row 1 is still displayed. ControlSource is set to CUS_ID.

    Am I supposed to build an Expression? I tried it but entering a cusnum gives me 'Cannot be edited, bound by Expression.'

    I suspect my tables don't have a column in common. CUS_ID exists in both, but they're not linked in any way that I know of. How do I include a column from one table in another? Can I drag it or point to it somewhere?



    Thanks - rev

    pics attached, in case it helps

    Thanks - rev

  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,922
    No pictures were attached.

  3. #3
    revnice is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    61
    Let's forget the join for now and boil it down to this:

    I want a form to auto-populate with customer info when I enter the customer number.

    That must be simple and yet I've managed to fail with astounding consistency.

    How do you do it? Where do you click

    Thanks - rev

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm not sure how your form is set up but you should probably be using a ComboBox to select the Customer and the NotInList event of the cbo to add a new Customer.

  5. #5
    revnice is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    61
    I'm close now, I got some help and I now have the form auto-populating. I'll checkout the NotInList event.

    Thanks!

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Because the actual data should *only* be in one table in your database, I hope you are using a join in the query behind the form. Let us know if you need more assistance.

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

Similar Threads

  1. Auto-populate form question
    By revnice in forum Access
    Replies: 19
    Last Post: 08-06-2010, 01:01 PM
  2. Auto-Populate Combo box
    By vincenoir in forum Forms
    Replies: 3
    Last Post: 10-14-2009, 07:06 AM
  3. Replies: 3
    Last Post: 10-05-2009, 07:22 AM
  4. Auto Populate Data from Main Form
    By billiejean in forum Forms
    Replies: 0
    Last Post: 08-05-2009, 08:08 AM
  5. Auto populate fields on a form
    By ldarley in forum Forms
    Replies: 0
    Last Post: 08-14-2008, 09:39 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