Subject Re: combobox / msgbox
From Mervyn Bick <invalid@invalid.invalid>
Date Sat, 17 Feb 2024 14:32:08 +0200
Newsgroups dbase.getting-started

On 2024/02/16 16:05, Michel wrote:

>
> Mervyn,
> to let you know, I added a blank value at the biginning of the datasource because in my global form the user can choose a blank value.
>
> and after reading your code I tried the change below in the OnChange event of the combobox.
>
>     function MYCOMBOBOX1_onChange()
>        mval = upper(this.value)
> //      if  form.rowset.findkey(mval)
>        if  form.rowset.findkey(mval) and form.rowset.fields["nom"].value == mval && for exact match
>           ?"ok"
>        else
>           ?"go to msgbox"
>           inkey() && added instruction
>           msgbox("not found", "Check", 0 + 16)
>        endif
>        return
>
> and it seems to give expected result.
> Many thanks for support

You're welcome.  I'm glad you've found a working solution.

Mervyn.