Subject Re: Move to the searched record on the brows or grid on the form
From Gaetano <gaetanodd@hotmail.com>
Date Mon, 14 Sep 2020 05:46:16 +1000
Newsgroups dbase.getting-started


Your requirement sounds like a classic implementation of the seeker.cc
in the custom form controls of dBase. Have you been through the dBase
Tutorial? the tutorial will explain how to create a form with 2 tabs,
one tab for searching with a GRID to display matches, the record pointer
will move down the rowset as you type the search criteria in the seeker
control, the other tab has entryfields showing the details of the record
to update/delete or do whatever you need with it (it can of course be on
a single-page form too if it all fits...).



On 14/09/2020 04:26, AGOSTINHO wrote:
> Dear MerVyn thank you for your input and the note regarding
> uppercase characters for message headings.
>
> Please note that my problem is that when entering the search ccode in the entryfield1 it does not trigger the brows/grid object on the form, it don't moves anything on the object it remains on the top of the dbf files
>
>> On 2020-09-13 16:33, AGOSTINHO wrote:
>>> Dear group,
>>> On my form I search a record on the table but how do I move to the record
>>> on the brows or grid object on the form using this method
>>> SEE MY FORM BELLOW
>>>
>>
>> Please don't use all uppercase characters for message headings.  It is
>> considered to be "shouting" and nobody likes to be shouted at.  :-(
>>
>> FIND is not a dBASE command.  With an indexed table the XDML command is
>> SEEK.
>>
>> Try the following.  It has not been tested but it should work.  As you
>> type in characters it should move the row pointer to the first record
>> where the code matches the characters entered.
>>
>>      function ENTRYFIELD1_onKey1(nChar, nPosition,bShift,bControl)
>>         ccode=form.entryfield1.value
>>        // Find &ccode
>>         seek &ccode
>>         return
>>
>> Most of the old XDML commands have been retained in dBASE alongside the
>> new OODML commands.  This is to ensure some measure of backward
>> compatibility with older programs.  It is, however, really not a good
>> idea to use XDML for new code.  The new OODML is far more powerful and
>> flexible.
>>
>> Using OODML means a lot of learning but it's not difficult and the
>> effort is worth it.  As a starting point you should work through the
>> dBASE tutorial at
>>
>> http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
>>
>> Mervyn.
>>
>>
>>
>>
>>
>>
>>
>