Modify Code

Jul 05, 2005 2 Replies

I am trying to access the Itemlookup code for an item when an item is added to my screen (using hook 4).. The code I currently have loops through all the items I have on the screen. All I want is the ItemLookupCode for the item added to the screen



Currently this works but loops through all my items on the screen.



Dim E As Object ' QSRules.TransactionEntry



For Each E In Session.Transaction.Entries LookupCode = E.Item.ItemLookupCode Next E


Could someone help modify this.



TIA


the count property will return the total number of entries on the transaction screen, so you could use this to give you the index of the last entry made:

LastItem = Session.Transaction.Entries.Count LookupCode = Session.Transaction.Entries(LastItem).Item.ItemLookupCode

hth kevin

Chuck,

Try using the property below: TransactionEntry.Key Property The Key property gets the key for the transaction entry.

Public Property Get Key( _

) As String

Property Value String that contains the key of the transaction entry. This key is used to reference the transaction entry from the Transaction.Entries property.

Remarks Transaction entry keys are assigned sequentially as string representations of integers. For example, the third entry added to the transaction is assigned the entry key "3". These keys are unique for the duration of the transaction; if the entry with the key "1" is deleted, the key "1" will not be reused.

Rob

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required