>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 :
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 :
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