Try either
This.RowSource = ''
before the DO CASE
or
remove the this.RowSource lines and add
zap in tmpMaj
insert into tmpMaj
select distinct MainCat from Kategory
>I am facing an error in GotFocus Event of combo box. The code is as below:
>
>IF USED('kategory')
> USE IN kategory
>ENDIF
>Do Case
>Case This.Parent.cbogroup.optmajcat.Value = 1
> Select Distinct maincat From kategory Into Cursor tmpmaj
> This.RowSourceType = 2
> This.RowSource = 'tmpmaj'
>Case This.Parent.cbogroup.optcategory.Value = 1
> Select Distinct category From kategory Into Cursor tmpmaj
> This.RowSourceType = 2
> This.RowSource = 'tmpmaj'
>Case This.Parent.cbogroup.optsubcat.Value = 1
> Select Distinct subcat1 From kategory Into Cursor tmpmaj
> This.RowSourceType = 2
> This.RowSource = 'tmpmaj'
>Endcase
>
>
>
>And error is "Cannot access the selected table.tmpmaj"
>
>Saif
If it's not broken, fix it until it is.
My Blog