[V4RB] GoToRecID(xx)

Joakim Schramm joakim at astrocalc.com
Mon Jul 10 19:11:14 CDT 2006


 

> -----Original Message-----
> From: valentina-bounces at lists.macserve.net 
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of 
> Ruslan Zasukhin
> Sent: 10 July 2006 19:03
> To: valentina at lists.macserve.net
> Subject: Re: [V4RB] GoToRecID(xx)
> 
> On 7/10/06 7:54 PM, "Joakim Schramm" <joakim at astrocalc.com> wrote:
> 
> > I don't understand what you people are stumbling on, the 
> property is 
> > already there, VTable.RecID, why type 7 chars more to get 
> the same thing???
> 
> Not exactly the same.
> 
> For example, you could delete Record with RecID 3.
> 
> What will happens if you try
> 
>         tbl.RecID = 3
> ?
> 
> At least its current record is not changed. But you have no 
> easy way IF you was moved to new record or now. This did GoTo
> 
>     if tblGoTo(3) 
> 
> Is TRUE only if record 3 really exists, and you was moved to 
> that record.
> Otherwise FALSE
> 

Ok, I don't know anything about tblGoTo(n) as I come in with 2.3, but I was
mainly reacting to this with .CurrentRecID as a property with just 7 more
characters then now doing the same thing.

I agree though as a fuction RecordExistsGoTO(recid) could be useful as
mostly when checking for an exist you also what to goto that record BUT not
always, so both functions are needed. Or what about 

.RecordExists(recid as Long, Optional GoTo as Boolean = False) as Boolean

It wont break current code but gives you option to amend/optimize it? Of
course GoTo would only come into play IF the Record exists.

Regards,

Joakim



More information about the Valentina mailing list