I have a problem in a project using Data controls. My form contains 5
data controls and at run time I initialize the datasource controls
and set the recordset as follows:
datasource_benchmark_code.DatabaseName = database_file_name
Set datasource_benchmark_code.Recordset =
database_ref.OpenRecordset _
( _
"SELECT DISTINCT BenchmarkCode " & _
"FROM Merged_Data WHERE " & _
"BenchmarkCode <> '' " & _
"ORDER BY BenchmarkCode" _
)
As soon as this code gets executed, the program aborts and leaves no
error messages only with a popup to contact Microsoft with the
messages below:
Visual Basic has encountered a problem and needs to close. We are
sorry for the inconvenience.
Please tell Microsoft about this problem.
and the Send Error Report or Don't Send buttons.
If I just compile the program and run the .exe then it works. It's
only when I'm in design mode that the program fails.
Please help!!!
Thanks,
Amie