Subject |
Re: applylocate not working |
From |
Charlie <tm@tc,com> <Charlie <tm@tc,com>> |
Date |
Sat, 08 Jun 2024 01:50:50 -0400 |
Newsgroups |
dbase.getting-started |
One more try at understanding what is happening with the xdnl. This is easy to explain...
In the test code below I have made variables out of the id, category, and grade. The value I should be finding in the ms60 field is 18. if you look at the message box below in the code the last item is ms60 which has a value of 18 which is correct. Found is true. But the value for ttgrade and t are 161. That amount is the same as record number 1 in the ms60 field of the table. So if I call the field by its actual name (ms60) it works. Variables don't work for the field name with locate. Is there any logical reason for this? Is there a fix?
use coins
TID = "1950D"
TCAT = "JEFFERSON NICKELS"
TTGRADE = MS60
locate for year = tid and category = tcat
IF FOUND()
t = '&ttgrade.'
msgbox( ""+found()+" "+TTGRADE+" "+t+" "+ms60 )
endif
Ken Mayer Wrote:
> On 6/7/2024 1:32 PM, Charlie wrote:
> > Hi Ken... Thanks. I tried that but it still is not found. It is almost apply locate has stopped working, although it still works in other programs i've written..
> >
> > I have tried using a xdml function using locate which actually finds the row but i am having problems returning something to the form because the field for grade is selected by the user and there are 11 different fields for grade in the table. I am not sure how to handle that. I have tried macros, etc, And although it seems to find the row, it doesn't seem to remember the row when I try to return it to the form. It sees row 1 only.
> >
> > This is a mess. Possibly there is something screwy with my computer. I hope not.
> >
>
> It's probably not your computer. Break it down. Do an applyLocate one
> one part. If that works, then try another ... and so on. Work it through
> logically ... one step at a time.
>
> Ken
>
> --
> *Ken Mayer*
> Ken's dBASE Page: http://www.goldenstag.net/dbase
> The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
> dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
> dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
> dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
> dBASE DOS to Windows Tutorial:
> http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm
>
|
|