Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Decimal separator
Message
From
30/06/2005 18:05:35
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
30/06/2005 14:12:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01027096
Message ID:
01027925
Views:
41
>Cetin,
>
>And again you have helped me with your answer. I am really happy with it. Because now the program is working correctly on different computers with different operating systems.
>
>I have one more problem in my program. Maybe you know the answer....
>
>I have a form with a grid on it. This grid have a recordsource that is a table. Now when I click on a row one time, the row gets highlighted. The click procedure is that when a user clicks on a row, the program will close the form and goes to another form with the data of the chosen record. But if I do that on antoher computer, the program doesn't come with the chosen data, but with the data of one record before. Imagine I click on record number 9 but the program gets the data of recordno. 8 And it's only happening on other computers. Eventhough the table is indexed, so I can search perfectly..... Strange (?) Here's my code:
>
>*************************************************************************
>SET SAFETY OFF
>SELECT 0
>USE data\leden INDEX data\lidbranchenr SHARED
>GO TOP
>m_zoekwaarde = ALLTRIM(This.Value) + ALLTRIM ;(ThisForm.grdoverzicht.Column3.Text1.Value)
>
>IF SEEK(m_zoekwaarde)
> ** Fill the public vars for later use...
> m_lidnr = ALLTRIM(lidnr)
> m_branche = ALLTRIM(branche)
> m_branchenrlid = ALLTRIM(branchenr)
> m_bedrnmlid = ALLTRIM(bedrnm)
> m_cplid = ALLTRIM(cp)
> m_adreslid = ALLTRIM(adres)
> m_postcodelid = ALLTRIM(UPPER(postcode))
> m_plaatslid = ALLTRIM(UPPER(plaats))
> m_bankgiro = ALLTRIM(bankgiro)
> ** Aantalen van de pasjes ophalen...
> m_pas_tot = pas_tot
> m_pas_bp = pas_bp
> m_pas_es = pas_es
> m_pas_tx = pas_tx
> m_pas_tf = pas_tf
> CLOSE ALL
> ThisForm.Release
>ENDIF
>
>*************************************************************************
>
>I really hope you can help me with this very strange problem...
>
>Greetings,
>Ron

Ron,
Never use this.value, .myGrid.ColumnX.Text1.Value and similar with grids ( Never say never:). You could but then it is tricky).
Directly use its recordsource and fieldname.

If this.Controlsource is myTable.myField1 and Column3.controlsource is myTable.myField2 then:
m_zoekwaarde = ALLTRIM(myTable.myField1 - myTable.myField2)
Also:
Do not use public variables.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform