Results 1 to 5 of 5
  1. #1
    gilescarey is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    3

    Subform Lookup

    Hi
    I am new to Access form design and am trying to do something that I didn't think would be too hard, but am having trouble with it so would appreciate some input.

    I have a table SiteList which has details in a number of fields on various Archaeological Sites. These all have a unique SiteID.

    I have a table of Bibliographical details, called References. These all have a unique RefID. This also holds the exact page number of the references.

    I have a table LinkTable which holds connections between SiteList and References. This is a one-to-many relationship, so that one Site can have multiple References, and one Reference can be featured on multiple Sites.

    I have designed a form which displays all info from SiteList, with a References site form which displays the appropriate References for that site, together with page numbers - very useful.

    I want to use the subform for Site Input. Basically this needs to include being able to add a link in LinkTable between that site id and that ref id where a Reference already exists. If I want to add a new reference, I should be able to do this, and create linkages between the Site and Reference.

    Ideally as well, I would like to be able to lookup, by typing the first few letters of the reference to see whether it already exists.

    Could somebody point me in the right direction of how to go about this, please



    Hope this makes sense, but please contact me if it requires clarification.

    Thanks in advance,
    Giles

  2. #2
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229
    You mention a Link Table and a one-to-many relationship at the same time; did you mean a many-to-many relationship instead? See attached sample.

  3. #3
    gilescarey is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    3
    Hi
    Many thanks for your reply, that was exactly what I was looking for. However, i altered your database to reflect the fields of my tables, and redesigned the forms, but unfortunately now I am getting the error when opening up frmSites "the expression is typed incorrectly or is too complex to evaluate." and Table.References doesn't seem to display, unfortunately - previously this was doing exactly what I wanted in terms of lookup and adding new refs.

    Any pointers gratefully appreciated.

    Thanks for your help in this one.

  4. #4
    gilescarey is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    3
    Oh I attach so you can see what I am attempting.

  5. #5
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229
    Something is wrong with your frmSites. It opens fine without the subform but when i create a new subform for references, the problem persists. However, when I created a new Sites form with the wizard, the subform came up automatically and worked fine.

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

Similar Threads

  1. Replies: 7
    Last Post: 07-15-2011, 01:58 PM
  2. Write Code to Navigate from Subform to Subform
    By Swilliams987 in forum Programming
    Replies: 22
    Last Post: 02-04-2011, 11:30 AM
  3. Replies: 15
    Last Post: 11-09-2010, 04:27 PM
  4. Replies: 5
    Last Post: 06-29-2010, 01:24 PM
  5. Lookup in subform
    By ehrendreich in forum Forms
    Replies: 9
    Last Post: 12-13-2009, 03:44 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