Results 1 to 3 of 3

Thread: Let me rephrase my previous question...

  1. #1

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

    Post

    Hopefully, if I rephrase, I can get an answer! My problem is this: I have a database with three tables. I've created a VB form to update one of the tables (the Events table). The other two tables (Manuscripts and Markets) won't be updated with this VB form--they are only to pull in information.

    The VB form pulls in the primary keys from the other two tables (manu_number and market_number) and puts them in text boxes. It does that o.k.. I want it to write those numbers to the appropriate fields in the Events table. This way, the Events table will be able to keep track of which event affected which manuscript.

    If you've read this far, thanks! Here's the code I have:

    Events.Recordset.Edit
    Events!market_number = txt_market_num
    Events!manuscript_number = txt_manu_num
    Events.Recordset.Update

    I put this code in a command button click event called "Update Database".

    This was just a shot in the dark to try to get it to write to my Events table, but it doesn't work!

    I have three data elements on the form, Events, Markets, and Manuscripts. Any ideas as to why the code above doesn't work? Events is my RecordSource, and it's a dynaset. The error I get is "Can't assign to read-only property."

    I'd appreciate any help!

    Kimberly

  2. #2
    Lively Member
    Join Date
    Jan 1999
    Posts
    82

    Post

    Hi,

    At what line in the code do you get your error?

    Also, instead of Events.Recordset.Edit
    try Events.Recordset.Addnew

    Edit is used for editing an existing record which is, I think, what you do not want.

    HTH,

    Preeti

  3. #3

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

    Post

    Thanks! Actually, I dug through some other posts and found some code that you suggested to someone else that I was able to modify to make work for me. So, you helped without even trying!

    Thanks again.

    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