2nd Subform disconnect from 1st Subform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • John Torres
    New Member
    • Jan 2008
    • 42

    2nd Subform disconnect from 1st Subform

    I have an existing Database which I have modified to new dbase with the same structure (1 Main and 2 subforms- 2nd subform corresponds to the 1st subform) but I have changed the names/ labels (not the fields name) and added more fields data. I’m trying to do a shortcut I thought it will be easier to copy the existing dbase add fields and change the name labels. but it looks like I ended up disconnecting the 2nd subform. The main form and 1st subform are OK except that 2nd subform. Whenever I click to update the 2nd subform it goes “Run Time Error ‘2465’….can’t find the Transaction ID (primary key of 1st subform) referred in your expression.” Then it goes to “Object Invalid or no longer set”. Any idea where should I start looking into?
    Thanks- appreciate any help!
    Access 2000
    Vista
  • John Torres
    New Member
    • Jan 2008
    • 42

    #2
    The SQL below gets hi-lighted when the error appears. For some reason it's not seeing the 'Transaction ID' but it's there. It works on the original Dbase where I copied it.

    DoCmd.RunSQL "UPDATE [Inventory Transactions] SET [Inventory Transactions].[Qty Shipped] = " & Me.TextTotal & _
    " WHERE (([Inventory Transactions].[Transaction ID])=" & Me.[Transaction ID] & _
    " AND ([Inventory Transactions].[Purchase Order ID])= " & Me.[Purchase Order ID] & ");"

    Thanks again,
    John



    Originally posted by John Torres
    I have an existing Database which I have modified to new dbase with the same structure (1 Main and 2 subforms- 2nd subform corresponds to the 1st subform) but I have changed the names/ labels (not the fields name) and added more fields data. I’m trying to do a shortcut I thought it will be easier to copy the existing dbase add fields and change the name labels. but it looks like I ended up disconnecting the 2nd subform. The main form and 1st subform are OK except that 2nd subform. Whenever I click to update the 2nd subform it goes “Run Time Error ‘2465’….can’t find the Transaction ID (primary key of 1st subform) referred in your expression.” Then it goes to “Object Invalid or no longer set”. Any idea where should I start looking into?
    Thanks- appreciate any help!
    Access 2000
    Vista

    Comment

    • Stewart Ross
      Recognized Expert Moderator Specialist
      • Feb 2008
      • 2545

      #3
      Originally posted by John Torres
      The SQL below gets hi-lighted when the error appears. For some reason it's not seeing the 'Transaction ID' but it's there. It works on the original Dbase where I copied it.

      DoCmd.RunSQL "UPDATE [Inventory Transactions] SET [Inventory Transactions].[Qty Shipped] = " & Me.TextTotal & _
      " WHERE (([Inventory Transactions].[Transaction ID])=" & Me.[Transaction ID] & _
      " AND ([Inventory Transactions].[Purchase Order ID])= " & Me.[Purchase Order ID] & ");"

      Thanks again,
      John
      Hi John. Could it be that you have accidentally changed the name of your [Transaction ID] control to something different when you changed names/labels? It is the control name as placed on the form that is being referenced by Me.[Transaction ID], not the name of the underlying field to which it is bound.

      -Stewart

      Comment

      Working...