Method Community

 

Join 2 Tables in MethodVBA for Excel

Last post 04-11-2011 2:27 PM by CDS_Josh. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-05-2011 11:49 PM

    Join 2 Tables in MethodVBA for Excel

    I am trying to join the PurchaseOrder table with the PurchaseOrderLine table but cannot figure out the syntax to accomplish this in the MethodVBA examples.

    I thought I could accomplish this somehow with the sSelectFrom variable, but I cannot seem to get this working.


    Before I lose my hair, is this even possible?

  • 04-06-2011 7:47 AM In reply to

    Re: Join 2 Tables in MethodVBA for Excel

    Answer

     Josh -

    Easiest thing would be to first add linked fields in PurchaseOrderLine table under Customize > Tables.  Since there is already a join from PurchaseOrderLine to PurchaseOrder, you can display linked fields on the PurchaseOrderLine table from the PurchaseOrder table.

    Then in the API, you can just pull from the PurchaseOrderLine table and you'll get the results you need.

    Either that, or you do two calls - one to get values from PurchaseOrderLine and one to get values from PurchaseOrder.

    Paul

  • 04-11-2011 2:27 PM In reply to

    Re: Join 2 Tables in MethodVBA for Excel

    Sorry for the late reply.  Worked perfectly

Page 1 of 1 (3 items)