>use "tax"+thisform.combo1.Value > >if !found() &&mean "tax"+thisform.combo1.Value.dbf > =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.
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) > 0Option (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.