Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Australia
    Posts
    183

    Lightbulb Unanswered: Update data help

    Hello guys,thanks to all willing to help.

    I am going crazy at the moment.

    I have a luCompany table (CompanyID,CompanyName,ContactID) ContactID field is empty and I am trying to use an update query to upload data into that field form tblContacts that has that same field and data that I need.

    Two things are troubling me: When I create an update query and specify the field to be updated it is saying it is not an updatable field because it is an AutoNumber.

    Second, I have to specifly to update ContactID where CompanyName is this and CompanyID is that.

    Can this be done like this, is there any other way or doing it??!
    Hope you know what I mean.

    Thanks and regards

  2. #2
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369

    Arrow Re: Update data help

    Originally posted by zobernjik
    When I create an update query and specify the field to be updated it is saying it is not an updatable field because it is an AutoNumber.

    Second, I have to specifly to update ContactID where CompanyName is this and CompanyID is that.
    Is it an update or APPEND you want to do? Two different query types.

    What is the number series of the existing data you want to put into the AutoNumber field? And what field type is the source data, Number/AutoNumber or Text?

    In the first criteria line in the query's design view, set the following criteria for the ContactID field:
    [CompanyName]=this AND [CompanyID]=that

    BUT: why do you need CompanyName if you have CompanyID? Might be sufficient to enter just :
    [CompanyID]=that
    (replace "that" with a number)

    I guess you would want/need a way to move to the next parametre of the criteria automatically, fetching values from a lookup or something. This is not a full "solution", see how far you get, and specify the criterias and sources for how to automatically move to the next CompanyID, so can we specify that part too.

    D.

  3. #3
    Join Date
    Feb 2004
    Location
    Australia
    Posts
    183
    Well I think it is an update, as I have to add data into that column already having CompanyID and CompanyName in that table.

    Source ContactID is AutoNumber, des ContactID is a Number.
    I don't need CompanyName, just making sure it goes where it should go.

    I didn't explain myself properly, I do not need to add 1 compny, writing criteria for that would be easy, but I need to add 43 records, do you see what I mean now, how do you write criteria having differnt CompanyIds?

    Thanks

Posting Permissions

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