Results 1 to 6 of 6
  1. #1
    Pantinosm is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    16

    Can't Add records to tables (New)

    Hi to all and please eexcuse me if my question are very simple for you.


    I have a patients databasein which i have a patients table that is connected with 4 other tables via PID (one to many).
    I the have a form in which i select my patient, and i have 4 individual buttons for 4 other pop up forms to enter or edit the information based on which patient i select.
    The problem is that whenever i add a record i get an error that i have a record related in my main Patients table. What changes i must do?
    I am attaching the file.mydb.zip The problem comes through my main form.

    Thank you for any help provided.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I don't work with macros so haven't looked into the code. I don't understand the Patient table attributes - seems many should/could be in some other table(s). You really haven't told us WHAT the database is about or what some of the "business rules/facts" are.
    I did attach a jpg of your tables showing all the fields. It may help others who read/respond to your post.
    Good luck.
    Attached Thumbnails Attached Thumbnails PatientDatabaseLayout.jpg  

  3. #3
    Pantinosm is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    16
    Forget about the fields in Patients table except the 2-3 first ones, the other dont matter at all. The whole system is based on a patients, and his different treatments that are in other tables. If you go to Main form, and select one patient, try to go lets say to Laser Treatment by pressing the button. When you try to add the record it doesn't let you.

    I think this is something very simple, i just don't understand the logic and how to work around it.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    The data structures - tables and relationships - are much like the foundation of a building. For me it's hard to forget about it.
    You can deal with the forms and buttons, but I'd recommend getting your structure set up to support your needs.

    Good luck.

  5. #5
    Pantinosm is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    16
    Dear orange i really appreciate what you say, but i came here for help to my problem, and i don't get any. My structure is ok, i don't see any wrong. I just want to know why i get these errors.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Suggest you identify that you are working with macros and need some help. As I said, I don't use macros and can not comment on their structure/use....

    I do see issues with you relationships -things that I would not have or suggest - but I don't know your business and business rules.

    Here is a tutorial that will help with data structure -- for reference if nothing else.
    http://www.rogersaccesslibrary.com/T...lationship.zip

    Again, good luck and stress the fact you use macros and need someone to review your database.

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

Similar Threads

  1. Losing Records in Tables
    By Shayne in forum Access
    Replies: 4
    Last Post: 03-23-2012, 04:05 AM
  2. Replies: 3
    Last Post: 01-05-2012, 12:04 PM
  3. Comparing Records in two (2) Tables.
    By RalphJ in forum Programming
    Replies: 19
    Last Post: 04-19-2011, 02:50 AM
  4. Compare records in 2 tables
    By RalphJ in forum Access
    Replies: 13
    Last Post: 03-06-2011, 07:43 AM
  5. Move records between tables
    By rogueakula in forum Access
    Replies: 1
    Last Post: 04-09-2010, 12:35 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