Results 1 to 5 of 5

Thread: Unable to add records to a table containing a foreign key

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    3
    Never mind, I figured out the problem and got things working.

  2. #2
    Join Date
    Mar 2006
    Location
    Oklahoma City, OK
    Posts
    184
    Was it due to this?

    Code:
    CandyBarID INTEGER NOT NULL
    Did you need to set a value in the fiuld CandyBarID?
    Boyd Trimmell aka HiTech Coach
    Microsoft MVP - Access Expert
    [SIGPIC][/SIGPIC]
    Office Programming 25+ years as a Software Developer specializing in:
    Business Process Management
    Accounting/Inventory Control
    Customer Relations Management (CRM)
    Electronic Data Interchange (EDI)

  3. #3
    Join Date
    Sep 2009
    Posts
    3
    Yep, that was the problem. I thought, since it was the foreign key, that it would be automatically populated with information. I didn't know that I had to enter it myself.

  4. #4
    Join Date
    Mar 2006
    Location
    Oklahoma City, OK
    Posts
    184
    If you are using a form/sub form, and have the Master/Child Linking field properties set,t hen you are tell Acess to handle the update.

    With a query, you have to do it manually.
    Boyd Trimmell aka HiTech Coach
    Microsoft MVP - Access Expert
    [SIGPIC][/SIGPIC]
    Office Programming 25+ years as a Software Developer specializing in:
    Business Process Management
    Accounting/Inventory Control
    Customer Relations Management (CRM)
    Electronic Data Interchange (EDI)

Tags for this Thread

Posting Permissions

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