Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2012
    Posts
    3

    Unanswered: Looking for a solution to an Access riddle . . .

    I'm a novice at Access, so this might be a very obvious solution to some - so here is my riddle:

    I have Table1 which is used as data source for Form1 which has a control displaying Number1,( the auto number primary key of Table1 for example)
    I have Table2 which is used as data source for Form2 which has a control displaying Number2,( the auto number primary key of Table2 for example)
    I have Table3 which is used as data source for Form3 which has a control displaying Number3, and a control displaying Number4 as well as other controls which have been filled with data by the used.

    The ideal solution would not require Number3 and Number4 to be displayed in Form3 at all and would create a new record in Table3 in which:
    (1) the value of Number3 has been set to Number1
    (2) the value of Number4 has been set to Number2
    (3) the values keyed into the controls on Form3 are also in the new record and it would be nice if this all happens at the click of a button.

    -Thanks-

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Oh wow, at first I thought it was a homework question that you were trying to get us to answer for you. But since you said "here is my riddle" instead of "here is my homework", obviously that must not be the case and I should drop everything to help you.


    Then again, I'm kind of hungry. Maybe later.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Mar 2012
    Posts
    3
    Sorry for the confusion about the title - just making lite of a frustrating challenge I've come across and knowing it is probably academic to someone more skilled. I'm working on a database for my business and have pretty much have no formal education in Access or database management.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    sounds like table 3 is an intersection table between tables 1 & 2
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Mar 2012
    Posts
    3
    Thanks healdem, but I don't believe that's the case. The two values I'm trying to place in table 3 would constitute a 2 field primary key for table 3. Is there a way to do that perhaps? I understand in theory anyway that no two entries in a table (table 3 for example) can have the same pair of these number even though either number may appear more than once. But it there is a way around this - that would make this project easier.

    Thanks for the insight . . .

  6. #6
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    994
    Provided Answers: 2
    The two values I'm trying to place in table 3 would constitute a 2 field primary key for table 3.
    That's exactly how an intersection table generally works - it has a compound key, composed of the keys of the tables whose values intersect in it.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Posting Permissions

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