Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2011
    Posts
    7

    Unanswered: [Access 2k3 + VBA] SQL UPDATE add pk_id instead of customers name

    Hi,

    I have a product table with a bound combobox to customer name table;, and when I try update:

    Code:
    UPDATE product
    SET customer_name_clone=customer_name;
    the update function add customer PK_ID instead of customers name!!!

    How can I fix this, please?

    Regards

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Change the bound column of the combo, or explicitly reference the column that contains the data you want to use in the query. If customer_name is the name of the combo, use something like:
    Code:
    Me.customer_name.Column(x)
    Where x is the numeric index of the column (the leftmost column being Column(0)).
    Have a nice day!

Posting Permissions

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