` Printed Icetips Article

Icetips Article



Par2: Multi-field locate funtion
2000-12-28 -- Jeff Slarve
 
>I have a browse with three columns My:Col1, My:Col2 & My:Col3
>The browse is using My:MYkey which is made up of My:Col1, My:Col2 & My:Col3
>(all ascending)
>
>I want to add three [entry] fields underneath the browse ( Yep!:)  XCol1, XCol2 &
>XCol3 and I also want a 
>button. When I fill in XCol1, XCol2 & XCol3, I want top Locate the Row which
>matches the three fields.
>
>In other words, I want to locate when I press the  button and NOT
>when I fill in a particluar field only.

First you would prime your key fields as in legacy, then either:

If NOT Access:YourFile.Fetch(PRE:YourKEY)
   YourBrowse.ResetFromBuffer()
End

Or, if you want to get "close" if there is no exact match:

!PrimeFields
Access:YourFile.Next()

Dennis Evans notes:
  The Access.Next is not needed, just prime the fields and ResetFromBuffer.



Printed November 21, 2024, 11:32 am
This article has been viewed/printed 35225 times.