I can create each relationship in code separately, but I seem to remember
that if I, say, ask for Attributes = dbRelationUpdateCascade +
dbRelationDeleteCascade and that relationship fails because someone has
managed to delete records such that the referential integrity is destroyed,
then no relationship is formed at all. In this case, I would need a simple
relationship without referential integrity to be created. But, because the
database is not with me, but out on a site somewhere, I have no way of
checking if the referential integrity failed or not. Is there a simple way
of in code, creating a normal relationship if referential integrity fails?
dixie
"dixie" <di****@dogmail.com> wrote in message
news:q2****************@nnrp1.ozemail.com.au...
The rest of the database would have been updated (as in a new version with
some fix or new feature), so it is not practical to just copy the file.
What I want to do is to import the old tables into the new database,
getting their relationships too. I know I can do this with a manual File --> Get
external data --> import, but I am trying to do it without the user
needing to go to the database window.
dixie
"Pavel Romashkin" <pa*************@hotmail.com> wrote in message
news:40***************@hotmail.com... Wouldn't it be easier to just copy the entire file? It would preserve
the relationships...
Pavel
dixie wrote:
OK, thanks, I understand that. Am I Correct in presuming that this
will not bring the relationships with the tables? If not, is there a simple
way of doing it?
dixie
"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message
news:s1******************@news-server.bigpond.net.au...
> This is off the top of my head so I hope it works ok :)
>
> dim myDB as TableDef
> set myTD = CurrentDB.TableDefs
> for i = 0 to (myTD.Count - 1)
> InTable = myTD(i).Name
> OutTable = myTD(i).Name
> OutDB = "c:\out.mdb"
> docmd.copyobject OutDB, InTable, acTable, OutTable
> next
>
> --
> Bradley
> Software Developer www.hrsystems.com.au
> A Christian Response www.pastornet.net.au/response
>
>
> "dixie" <di****@dogmail.com> wrote in message
> news:un****************@nnrp1.ozemail.com.au...
> > You couldn't give me an example of this I suppose.
> >
> > dixie
> >
> > "Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message
> > news:40******@nexus.comcen.com.au...
> > > Loop through the TableDefs collection and export each table... ?
> > > --
> > > Bradley
> > > Software Developer www.hrsystems.com.au
> > > A Christian Response www.pastornet.net.au/response
> > >
> > > "dixie" <di****@dogmail.com> wrote in message
> > > news:zF****************@nnrp1.ozemail.com.au...
> > > > If I wanted to be able to copy all of the tables in an
existing > database
> > > > called Original.mde to another database called New.mde from a
button > > click
> > > > event in Original.mde, is there an easy way of coding it
without > naming
> > > > every single table in Original.mde. I am looking for a way of
> updating
> > a
> > > > database on site without needing to access the database window and > > import
> > > > the existing tables into a new empty database.
> > > >
> > > > dixie
> > > >
> > > >
> > >
> > >
> >
> >
>
>