Results 1 to 4 of 4
  1. #1
    bellczar is offline Novice
    Windows 8 Access 2007
    Join Date
    Feb 2013
    Posts
    9

    Trying to use a form to add to a table

    I am having trouble creating a data entry page.

    The database is the index to a record/CD collection. One table is songs, one is recordings ("sources"), and a third contains links between the two. Each record in songs has a unique ID, LRN. Each record in sources has a unique ID, acqno. Suppose a particular song has LRN 294 and appears on acqno 101, 252, and 747. This would be contained in the links table.
    LRN Acqno
    294 101
    294 252
    294 747
    etc.

    My problem is that I have a data entry form that pulls up an individual record within songs, and then I want to "Add new recording," which is to say, I want to add a new record to the links table that contains the LRN for the CURRENT record in songs and then be prompted to manually enter an acqno (referring to a new source that has just been added).

    I seem to have at best a vague idea how to do this part. I have created a macro called AddLink that the "Add new recording" button activates, but all I get are error messages.



    Any ideas? Thank you in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Are you using form/subform arrangement? Properly bound and structured forms should allow input of data without code.
    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
    bellczar is offline Novice
    Windows 8 Access 2007
    Join Date
    Feb 2013
    Posts
    9
    Thanks, June 7. I did what you suggested and now have a functional form, with one drawback. When I initially click on the intersection table, I get an error message that says "The object doesn't contain the Automation object 'links.' You tried to run a Visual Basic procedure to set a property or method for an object. However, the component doesn't make the property or method available for Automation operations. Check the component's documentation for information on the properties and methods it makes available for Automation operations."

    Once I dismiss the pop-up message, it works fine. How can I eliminate the error message altogether.

    Thanks. Tony

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Apparently there is some code somewhere triggering the error. What do you mean by 'click on the intersection table' - the subform? If you want to provide db for analysis, follow instructions at bottom of my post.
    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. Replies: 7
    Last Post: 09-21-2012, 11:09 AM
  2. Replies: 2
    Last Post: 08-01-2011, 11:35 PM
  3. Replies: 2
    Last Post: 12-22-2010, 01:46 PM
  4. Replies: 1
    Last Post: 03-08-2010, 02:32 AM

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