export schema problems

K

Keith G Hicks

I'm working on some code to export the schema from an mdb. It's not letting
me get the info on queries that are embeded in form dropdowns, list boxes,
etc.

Dim qd As QueryDef
For Each qd In db.QueryDefs
Application.ExportXML ObjectType:=acExportQuery,
DataSource:=qd.Name, SchemaTarget:=sWhereToStore & qd.Name & ".xsd"
Next qd

When the above code runs it works fine except for what I mentioned. When it
gets to a query that's in a form it tells me the query doesn't exist. For
example in a form called "frmAddEditCertHolders" I have a combo box for
states where the source for the query is just something like "Select * from
tblStates". The name of the query for the combo ends up being this:
~sq_cfrmAddEditCertHolders~sq_cStateCode. If I do a debug.print qd.SQL it
gives me the SQL for it but I want more than that. How can I get ExportXML
to recognized these queries?

When I run ExportXML on my forms, it doesn't give me any embeded query
information.

It also only lets you export xml for Select, Crosstb and Union queries. Why
is this so limited??? How can I get around this?

Thanks,

Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top