Need Help

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi everyone,

I don't understand why one of two computers does not show a list of report
in a box on the form using row source.

SELECT DISTINCTROW msysobjects.Name, msysobjects.Type, * FROM msysobjects
WHERE (((msysobjects.Type)=-32764) AND ((Left([name],3))="rpt"))

The second computer show it's working and provide a list of reports but not
the first one. I don't understand why and I would be happy if you tell me
what I did wrong on the first computer that does not show a list of reports
in a box. I am using Access 97.

Thanks
 
Hi everyone,

I don't understand why one of two computers does not show a list of report
in a box on the form using row source.

SELECT DISTINCTROW msysobjects.Name, msysobjects.Type, * FROM msysobjects
WHERE (((msysobjects.Type)=-32764) AND ((Left([name],3))="rpt"))

The second computer show it's working and provide a list of reports but not
the first one. I don't understand why and I would be happy if you tell me
what I did wrong on the first computer that does not show a list of reports
in a box. I am using Access 97.

Thanks

Why DistinctRow?
You certainly don't have two reports with the same name!
Why all the additional columns to get the report names?
If you are using the * in the SQL, that will return all the columns,
so you don't need to specify Name and Type

SELECT msysobjects.*
FROM msysobjects
WHERE (((msysobjects.Type)=-32764) AND ((Left([name],3))="rpt"));

will return the same report names as your SQL.


Things to look for....
1) Is the RowSourceType property set to Table/Queries?
2) Is the Combo's Bound column set to 1?
3) is the Combo's Column Count property set to the number of columns
returned by the above SQL (17)?
4) Is the Combo's Column Widths property set to 1";1";1" etc. for the
number of columns returned?
5) Copy and paste the above RowSource SQL into a new query.
Does it display the list of reports?

The below SQL should return all report names, whether or not the name
is preceded by "rpt".
Does this one work for you?

SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((Left([Name],1))<>"~") AND ((MSysObjects.Type)=-32764))
ORDER BY MSysObjects.Name;

Column Count = 1.
Column Widths = 1"
Bound Column = 1
 
Back
Top