how can I get the joined table field name to query the layer,after layer,table joined

Discussion created by arctested on Jun 18, 2013
Latest reply on Jun 18, 2013 by agray1

I am able to programmatically  join a layer and a table, the way suggest at "".

I need to now programatically get only the rows that were joined. or the count of the rows only joined. ie. if the layer had a "CITYID" field  joined to "CID" field of the table. may be only 10 rows had the same "CITYID" as the table.

or how can I refer the "CID" after the join in the where clause of the layer query. If I use

featurePin.Fields.FindField("CITY.CID") it returns '-1' ie. the cfield does not exists.

how can I get the joined table field name  to query the layer, after the layer and table were join
ed programmatically(VBA)?