A
Atlas
Access 2003 (with or without SP1) , adp, SQL server
1) Having a form and inserting manually a subform, when the subform wizard
pops up, selecting an existing subform, causes access to select a table with
the same name of the form. To force the subform loading the subform I have
to manually code in the "source object field": form.myformname
2) form + subform; if subform recordsource is set to a table, no problem.
if subform recordsource is set to a select statement (syntax check ok, works
if opened straightfully as a form) then an error message pops up stating
"The column name '_tableName' does not match with a table name or alias name
used in the query". Pay attention and notice that extra '_' in front of the
table name.
Traceing out the error with the profiler here's the offending statement:
declare @P1 int
set @P1=NULL
exec sp_prepare @P1 output, N'@P1 int', N'SELECT "_tableName".* FROM (SELECT
[tableName].*, [otherTable].* FROM [tableName] INNER JOIN [otherTable] ON
[tableName].IDT = [otherTable].IDO) AS DRVD_TBL WHERE ((@P1 = "IDT"))', 1
select @P1
There's an evident extra '_' char in the statement......
1) Having a form and inserting manually a subform, when the subform wizard
pops up, selecting an existing subform, causes access to select a table with
the same name of the form. To force the subform loading the subform I have
to manually code in the "source object field": form.myformname
2) form + subform; if subform recordsource is set to a table, no problem.
if subform recordsource is set to a select statement (syntax check ok, works
if opened straightfully as a form) then an error message pops up stating
"The column name '_tableName' does not match with a table name or alias name
used in the query". Pay attention and notice that extra '_' in front of the
table name.
Traceing out the error with the profiler here's the offending statement:
declare @P1 int
set @P1=NULL
exec sp_prepare @P1 output, N'@P1 int', N'SELECT "_tableName".* FROM (SELECT
[tableName].*, [otherTable].* FROM [tableName] INNER JOIN [otherTable] ON
[tableName].IDT = [otherTable].IDO) AS DRVD_TBL WHERE ((@P1 = "IDT"))', 1
select @P1
There's an evident extra '_' char in the statement......