Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clearing Combo Box Choices
Message
De
04/05/1999 01:48:09
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
03/05/1999 23:26:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00211482
Message ID:
00214865
Vues:
47
>Hello Cetin -
>
>I was really hoping today I was going to be able to send you a message that I completed the search form, but it will have to wait at least one day.
>
>I implemented the code (into my cmd button on my search form):
>
>with thisform.cmbofficetitle_search
> m.myofficeId = val(.list(.listindex,2))
>endwith
>
>if !empty(m.myofficeId)
> do form offices with m.myofficeId
>endif
>_____________________________________________________
>
>I believe this code is perfect, however, when I select values for all my combos and click my cmd button to fire my offices form, I recieve an error message that says:
>
>"No parameter statement found".
>
>So, I asked a few questions last night on the UT, and a developer said the problem is that I do not have any code in the INIT() of my OFFICES form. I believe I need a statement such as the following:
>
>parameter
>or
>lparamter m.myofficeId
>seek?
>set key to?
>
>Cetin, could you teach me the code that needs to be placed into the init() of my offices form to fire correctly? I am sure this is the last hurdle!
>
>I look forward to your reply
>
>
>*** Bye the way, thanks for the explanation of why you didn't use the following:
>
>offices.nofficed = val(.list(.listindex,2))
>
>I would have thought this was the correct way to go with the code, and I am glad you showed me why it couldn't work. I appreciate that.
>
>Jason
Hi Jason,
Remember, it was the code that we wrote when preparing OFFICES form :
*OFFICES.init
lparameters tuID
select offices
set order to tag id
set key to tuId
OFFICES form datasession is "private" and in DE only has "offices" table.
If you set properties of "Offices" table in DE as :
order = "id"
and in DE initialselectedalias = "offices" then the init code would be shorter :
*OFFICES.init
lparameters tuID
set key to tuId
tuId is parameter var's name. I used tuId b/c :
"t" for parameter, "u" for "unknown type". Now we know it's a numeric value making it "tnId" is wiser :)
Check "naming conventions" for a more detailed explanation.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform