You all are awesome! I could not survive without you guys and gals as my safety net.

Carl you idea was perfect!
I created a static variable that gets and holds the record id to be eliminated
I then @xlookup using the static variable to a standard variable and then use an if statement to see if my variables do not match before running my update to inventory.
It might not be the correct way but it works like a charm.
Thanks for the help and suggestions.
}
}
If vDoThing = "Eliminate Record" Then
{
// Eliminate Record and return product to inventory
vtraker = trakerid
//writeln(vtraker)
If Itm_PatientFirst <> "" Then
{
Vname = "for " + Itm_PatientFirst + " " + Itm_PatientLast
}
Else
{
Vname = TrakerID
vtraker = trakerid
}
If @askuser("Are you Sure You want this Record " + Vname, "eliminated?","")
{
vDelete = @selectTreeitem ("Search Update Menu!Record Commands!Delete Record (F3)")
//Vmatchkey = @XLookup(@fn, trakerID, "medstrak!trakerID", "trakerid")
Vmatchkey = @XLookup(@fn, vtraker, "medstrak!trakerID", "trakerid")
If Vmatchkey <> Vtraker then
{
XPost(@Fn, Itm_productname, "producttrak!Prod_name","1","Prod_quantityonhand","Add")
@Msgbox("Returning 1 Bottle of" + " " + Itm_ProductName + " to Inventory","","")
throwfocus(Itm_physgroupstate)
}
Else
{
@Msgbox("No Changes or Deletions Occured","","")
//throwfocus(Itm_physgroupstate)
}
}
Else
{
@Msgbox("No Changes or Deletions Occured","","")
//throwfocus(Itm_physgroupstate)
}
}
}