Results 1 to 2 of 2
  1. #1
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69

    Data Macro in Access 2010

    Hai
    I am having a problem with a data macro attached in one of my table. It was working fine until a month ago, but now it stops. I really appreciate if someone look into this and advise the probable cause why it is not updating the table.

    If Isnull([JobNo]) or Isnull([CellNo]) Then



    Raise Error
    Error No 1001
    Error Description " Job Number or Cell Number Missing"

    Else

    Lookup a Record in KITSMASTER
    Where Condition = KITID = TOOLMOVEMENT.KITID
    Edit Record

    SetField KITMASTER.AVMI
    Value = No

    setField KITMASTER.AVLOC
    VALUE = [TOOLMOVEMENT].[CELLNO]

    IF [TOOLMOVEMENT].[REQKIT]=YES THEN

    Lookup a Record in PLATETOOL
    Where Condition = KITID = PLATETOOL.KITID
    Edit Record

    SetField PLATETOOL.AVMI
    Value = No

    SetField PLATETOOL.AVLOC
    VALUE = [TOOLMOVEMENT].[CELLNO]
    ENDIF


    It updates the first table KITMASTER without any problem and not updating the second table PLATETOOL. But if I remove the IF condition from it, it updates. This IF statement is asscociated with a Yes/No field [REQKIT], which if I select in the form, then only it should update the [PLATETOOL] table.

    As I told before, it was working before with the IF statement, but I couldn't find out why it is not working now. I have already wasted 4 days now and I know it is difficult to suggest from this short lines, but any possiblilities in "Data Macro" is really appreciated. I have rechecked the value of [REQKIT] in the table and it picks the value "Yes" if we select it in the form, but fails to update second table [PLATETOOL] through the Data Maco.

    Thank you and regards

  2. #2
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    Did relationships change in the database by any chance? I would try running an update query against the tables to see if you can update through the query - I have seen this happen before where a relationship had been added to the tables from the database level..

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

Similar Threads

  1. 2010 Data Macro weirdness with Parameters
    By mkenyon2 in forum Programming
    Replies: 3
    Last Post: 10-09-2012, 10:12 AM
  2. Replies: 1
    Last Post: 04-18-2012, 11:16 AM
  3. Access 2010 first macro - errors
    By DLParker in forum Forms
    Replies: 9
    Last Post: 10-16-2011, 04:17 PM
  4. Access 2010 Macro Help
    By RayMilhon in forum Access
    Replies: 3
    Last Post: 09-30-2011, 12:03 PM
  5. Access 2010 Macro
    By RayMilhon in forum Access
    Replies: 3
    Last Post: 09-28-2011, 11:37 AM

Tags for this Thread

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