Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating table

Status
Not open for further replies.

mdeal

Technical User
Joined
Aug 30, 2002
Messages
9
Location
US
Howdy!!

I'm a little new at this, so any help is greatly appreciated! I currently have a form that allows the user to select a report to run from a list of available reports in a combo box. The form also provides a brief description of the report when it is selected in the combo box. The user can then hit a command button to run the desired report.

The report names and descriptions are stored in a table, and what I'd like to do is have the table automatically update itself when a new report is generated by the user. Not sure if I got all the needed details out there, but I'd sure appreciate any help.

Thanks,

Mike D.
 
you don't need a separate table. Access has one built-i (it's a system table called MSysObjects). The following queries will list whatever you want:

Query to list all forms:

SELECT MSysObjects.Name
FROM MsysObjects
WHERE (Left$([Name],1)<>&quot;~&quot;) AND (MSysObjects.Type)=-32768
ORDER BY MSysObjects.Name;

Query to list all macros:

SELECT MSysObjects.Name
FROM MsysObjects
WHERE (Left$([Name],1)<>&quot;~&quot;) AND (MSysObjects.Type)= -32766
ORDER BY MSysObjects.Name;

Query to list all modules:
SELECT MSysObjects.Name
FROM MsysObjects
WHERE (Left$([Name],1)<>&quot;~&quot;) AND (MSysObjects.Type)= -32761
ORDER BY MSysObjects.Name;

Query to list all queries:

SELECT MSysObjects.Name
FROM MsysObjects
WHERE (Left$([Name],1)<>&quot;~&quot;) AND (MSysObjects.Type)=5
ORDER BY MSysObjects.Name;

Query to list all reports:
SELECT MsysObjects.Name
FROM MsysObjects
WHERE (((Left$([Name],1))<>&quot;~&quot;) AND ((MsysObjects.Type)=-32764))
ORDER BY MsysObjects.Name;

Query to list all tables:

SELECT MSysObjects.Name
FROM MsysObjects
WHERE (Left$([Name],1)<>&quot;~&quot;) AND (Left$([Name],4) <> &quot;Msys&quot;) AND (MSysObjects.Type)=1
ORDER BY MSysObjects.Name;

Regards,
[pipe]
Daniel Vlas
Systems Consultant
danvlas@yahoo.com
 
Thanks! Now how would I use this query information to update a table that needs to store this plus other information about the reports?

Thanks,

Mike D.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top