[AccessD] List all tables and their fields

Gustav Brock gustav at cactus.dk
Fri Mar 24 03:44:30 CDT 2023


Hi Arthur

> Please explain why I need a Numbers table and what it ought to contain and 
> how I would use it. 

You don't need it. 
I've never had one. Instead, create a tiny query:

SELECT DISTINCT Abs([id] Mod 10) AS N
FROM MSysObjects;

Save it as Ten.
You can use that in Cartesian queries, for example to list all dates of the current year:

SELECT DateSerial(Year(Date()),1,1+[Ten_0].[N]+[Ten_1].[N]*10+[Ten_2].[N]*100) AS [Date]
FROM Ten AS Ten_0, Ten AS Ten_1, Ten AS Ten_2
WHERE (((DateSerial(Year(Date()),1,1+[Ten_0].[N]+[Ten_1].[N]*10+[Ten_2].[N]*100))<=DateSerial(Year(Date()),12,31)) AND ((Ten_2.N)<4))
ORDER BY DateSerial(Year(Date()),1,1+[Ten_0].[N]+[Ten_1].[N]*10+[Ten_2].[N]*100);

More examples can be found in the demo, Date.accdb, at my repository:

https://github.com/GustavBrock/VBA.Date

and in paragraph Datasets:

https://github.com/GustavBrock/VBA.Date#datasets---sets-of-dates

/gustav

-----Oprindelig meddelelse-----
Fra: AccessD <accessd-bounces+gustav=cactus.dk at databaseadvisors.com> På vegne af Arthur Fuller
Sendt: 24. marts 2023 08:55
Til: Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Emne: Re: [AccessD] List all tables and their fields

<snip> 


More information about the AccessD mailing list