Page 1 of 1

.Locate using 2 fields and 2 values

Posted: Wed 30 Jan 2013 12:49
by oz8hp
I use now if qryTransactions.Locate('fldyear', 2012, []) then to locate a record and making it the active one.
But I now would like to use 2 fields and 2 values like fldyear = 2012 and fldmonth = 43
Is that possible?

I have been spending a couple of hours with no result

Re: .Locate using 2 fields and 2 values

Posted: Wed 30 Jan 2013 13:26
by CristianP
Hallo,

Like for any TDataSet you will need to use:
qryTransactions.Locate('fldyear;fldmonth', VarArrayOf([2012, 43]), [])

Best Regards,
Cristian Peta

Re: .Locate using 2 fields and 2 values

Posted: Wed 30 Jan 2013 13:53
by oz8hp
Thanks - that was what I was looking for.