Results 1 to 12 of 12
  1. #1
    Bhat59 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Location
    Udupi, INDIA
    Posts
    20

    Populating Access through FORMS

    Hi, I am new to Access. I am using Access 2010 ver. 14 on Win 7(64bit).



    This is with regard to populating Access through Forms. I was using DataPerfect(from WordPerfect) earlier. I have created my first Access database. In dataPerfect I had several Panels(or Tables)that were linked. To go to another panel from one required a command while entering a data. With this command F5 I would go to the related panel automatically, fill in all the data and come back to my main panel and restart entering data here. But while entering data in Access form I am not taken to a related form automatically, instead, I get the message "you can not change or edit a record because a related record is required in such and such a table".

    If anybody has understood my question please answer or direct me to a youTube video. Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    The warning is self-explanatory. Table relationships have been established so that records cannot be added to a table without related record in another table first. I suspect form is not designed correctly. Probably need a form/subform arrangement. Would have to know more about your table structure.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Bhat59 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Location
    Udupi, INDIA
    Posts
    20
    Thank you for replying. OK, I filled in the data into a related form first and then things worked out correctly. But how to bring the auto incrementing number (the ID number) into a field of the related table? In DataPerfect this number was brought from the main table into the related table automatically through a link, and that field was a non-updatable field. Is there an arrangement in Access for this?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    That's what form/subform arrangement should accomplish.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Bhat59 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Location
    Udupi, INDIA
    Posts
    20
    I have a main table which has a primary key with an Autonumber and a related table which has foreign key with Long Integer as its data type. I want the auto number also to generate automatically in the related table, but the database is not doing that. I had to type in the number from the main table for the three records I tested. The relationship is shown 1-to-1. I have checked referential integrity and the 2 boxes below it when relating. Thanks for your help.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    You have set up a form/subform? Set Master/Child link properties of the subform container. This will synchronize the related records. As soon as you enter a value into any field of subform record, the foreign key field will populate.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Bhat59 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Location
    Udupi, INDIA
    Posts
    20
    Yes, I have setup forms for all the tables I have created. But where to set the master/Child link properties? In the property sheet of each form?

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Master/Child links are properties of the container control that holds the subform. You need to select the container control, not the form in the container. Open the form/subform in Design view, click what looks like the edge of the subform. This should select the container. Click anywhere inside the container and you select the form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Bhat59 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Location
    Udupi, INDIA
    Posts
    20
    No. I didn't get it. Opened the form in Design view, clicked what looks like the edge of the form. Left mouse click - nothing happerns except the rulers get blackened, Right mouse click - I get a menu and it has, besides other things, Property and form property. I tried in google and Youtube for the Master/child link properties and could get anything! Thanks for your help.

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Tried to replicate what you desribe. Left click turns Detail bar of form black, not ruler. I suspect you did not actually select the subform container control. When you select the container control you will see a narrow orange box with sizing handles around the subform.

    Access Help has guildelines on setting up form/subform. The concept is a parent (main, master) form on which a subform container control is created. This container has a SourceObject property. This can be a table, query, or form. Master/Child links are also properties of the container control.

    The container control is also used for report/subreport arrangement.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    Bhat59 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Location
    Udupi, INDIA
    Posts
    20
    I got it. I had not created subforms earlier. I was trying to link two forms without creating subbforms. I learn that a form can have one or more subforms. The linked number too got generated automatically. Problem is solved for the time being. I will get back to you if I want. Thank you again.

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Yes, arrangement can be form/subform(s)/subsubform, can nest up to maybe 7 forms. Most I have done is form/subform/subsubform.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Forms Populating Backwards
    By kbrown in forum Forms
    Replies: 0
    Last Post: 06-21-2011, 09:47 AM
  2. Auto populating fields from MS access
    By fawazeto in forum Forms
    Replies: 0
    Last Post: 04-04-2011, 08:25 PM
  3. Access Form not populating from tables
    By Jim from Waconia in forum Forms
    Replies: 8
    Last Post: 04-01-2011, 03:35 PM
  4. Replies: 17
    Last Post: 03-29-2010, 10:55 AM
  5. Populating Data in forms
    By cjbeck71081 in forum Forms
    Replies: 4
    Last Post: 01-16-2007, 04:15 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