hi,
thank you all very much,it works
>>hi all,
>>any idea , help
>>thanks.
>>
>>use "tax"+thisform.combo1.Value
>>
>>if !found()
>> =messagebox("table not found")
>>else
>>.
>>.
>>endif
>>
>
>First, to make debugging and program maintenance easier, store the table name into a variable. It is awkward to use the same complicated expression several times in the same program. In this case, "tax" + ThisForm.Combo1.Value.
>
>Just in case the above is real code, a ComboBox should NOT be named "Combo1". You should give it a name like CboFilename, i.e., it should start with "Cbo", and then a meaningful name. For sample code, or for a quick test, "Combo1" is acceptable.
>
>To get the filename, make sure the .DBF extension is included, for example:
>
>
>lcFileName = DefaultExt(ThisForm.Combo1.Value, "dbf")
>
>
>Now, to find out if the filename actually exists, use one of the following:
>
>
>1.
>if file(lcFilename)
>
>2.
>if adir(laFileList, lcFileName) > 0
>
>
>Option (1) will return .T. if the file is found anywhere among the search path (see "set path"), or even in the EXE. Therefore, option (2) is usually deemed safer.