Results 1 to 3 of 3

Thread: VB and Microsoft Access help in relating tables

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Location
    Warner Robins GA
    Posts
    4

    Post

    Here's what I'm trying to do, maybe someone can help!

    I'm trying to write a simple manuscript tracker (as in, fiction manuscripts that have been submitted to publications). I have an Access database with three tables, called manuscripts, markets, and events. All three tables have autonumbers as primary keys.

    I wrote a VB form to enter the events (such as acceptance, rejection, submittal). The plan is for the user to be able to enter an event (via a text box or list box), then the user would click on lists of manuscripts and markets (I used a data grid to get that on the form). The program would associate that event with a particular manuscript and market, such as "acceptance" for a story called "Evil Twin", to a market called "Murderous Intent". So hopefully, what would be written to the events table is the event, and the manuscript and market associated with it. In the access database, I set up relationships so that the event table is linked to both the market table and the manuscript table.

    I can make it write a new event to the Access event table, but I can't make it associate (and write) the manuscript and the market back to that event table! Does this make any sense? Does anyone have any ideas?

  2. #2
    Addicted Member
    Join Date
    Jan 1999
    Posts
    165

    Post

    You will need to code the insertion of recs into both of the other tables.
    There are several methods. If you hard code a SQL insert query in the relevant place and execute it:-

    YourDB.Execute(SQLinsertStr)

    Hope this helps.
    Regards,
    John.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Location
    Warner Robins GA
    Posts
    4

    Post

    I did do that, and it worked. Thanks!

    Kimberly

Posting Permissions

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



Click Here to Expand Forum to Full Width