L
lance.schaeffer
Hello,
Please see my problem as outlined below. Any advice/suggestions would
be appreciated! (Also not sure if I posted this in the appropriate
place, please advice if so)
Goal: When my database opens, if the developers-version of the database
front-end is open, I would like to have the database prompt the user to
ask whether or not Test data tables should be used, or whether or not
Live data tables should be used.
Method: Prior to this, my database had a form set as a startup form (my
main switchboard). in this form (called frmMain from this point
forward), the form_load procedure calls a second form to open as a
dialog (frmTableSwitchboard). This form has two buttons on it, one that
says "Use Test data" one that says "use live data". Upon pushing either
of these buttons, I have code written that 1) Deletes the old table
references, and 2) Reconnects the tables using the appropriate table db
File.
This is done through VBA using a loop for each tablename, with the
code:
For indexInteger = 0 To 16
DoCmd.DeleteObject acTable, tableString(indexInteger)
Next
Where tableString is a predefined array holding each table name
Conflict: When I attempt to delete the old table references, I get the
error:
"You can't delete the table 'tablenamehere'; it is participating in one
or more relationships".
I understand the problem - I have existing relationships which would be
lost when I do this, my question is, how can I work around this? I am
out of ideas.
Thanks,
Lance
Please see my problem as outlined below. Any advice/suggestions would
be appreciated! (Also not sure if I posted this in the appropriate
place, please advice if so)
Goal: When my database opens, if the developers-version of the database
front-end is open, I would like to have the database prompt the user to
ask whether or not Test data tables should be used, or whether or not
Live data tables should be used.
Method: Prior to this, my database had a form set as a startup form (my
main switchboard). in this form (called frmMain from this point
forward), the form_load procedure calls a second form to open as a
dialog (frmTableSwitchboard). This form has two buttons on it, one that
says "Use Test data" one that says "use live data". Upon pushing either
of these buttons, I have code written that 1) Deletes the old table
references, and 2) Reconnects the tables using the appropriate table db
File.
This is done through VBA using a loop for each tablename, with the
code:
For indexInteger = 0 To 16
DoCmd.DeleteObject acTable, tableString(indexInteger)
Next
Where tableString is a predefined array holding each table name
Conflict: When I attempt to delete the old table references, I get the
error:
"You can't delete the table 'tablenamehere'; it is participating in one
or more relationships".
I understand the problem - I have existing relationships which would be
lost when I do this, my question is, how can I work around this? I am
out of ideas.
Thanks,
Lance