SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: access problem

  1. #1
    BoOm-Rocka! Smarky's Avatar
    Join Date
    Jun 2000
    Location
    England
    Posts
    1,319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    access problem

    This is kinda very urgent so I hope its ok to post here.


    In access i have a database set up and i am getting the error "field cannot be updated" in my VB code. It doesn't tell me why it cant and clicking the help button does nothing. I'm clueless the code that gives me the error is:

    Plant_Number_of_transactions = Plant_Number_of_transactions + 1
    Plant_Value_of_transactions = Plant_Value_of_transactions + Value

    it seems to work for the first record i add then it brings the error. I have the excat same code working on a customer table and i get no errors whatsoever. So what is going on? anyone help its urgent
    Garlic bread, I've tasted it, it's the future

  2. #2
    BoOm-Rocka! Smarky's Avatar
    Join Date
    Jun 2000
    Location
    England
    Posts
    1,319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    litte update on the error. This code is run on the after_update of a field. When i update this field on an existing record it works. When creating a new record it doesn't.

    Garlic bread, I've tasted it, it's the future

  3. #3
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you have any subforms embedded in a main form? The relationship may be bad if thats the case If you are trying to enter data which is not saved into that form it might create problems.

    You may need a seperate input form...

    (I might have you all mixed up though )

  4. #4
    BoOm-Rocka! Smarky's Avatar
    Join Date
    Jun 2000
    Location
    England
    Posts
    1,319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think i have it working )

    I have a type field in two tables with a relationship between them. This is how these two tables are linked. In the form i created i did not have a type field because it wasn't a field i needed to edit. It appears i need to have this on the form but just make it invisible.

    What i find strange is the error was coming up on a totally diffrent table. Strange.


    Access is Evil btw
    Garlic bread, I've tasted it, it's the future


Bookmarks

Posting Permissions

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