One more help tonight please! Set warning to false does not stop the alert that opens up the datatabase. Is there a way to stop this?

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi, I'm using below code, it copies the table from different database. I want to be able to copy it without any pop up warning and stating things like coune potentially dangerous etc.
Or if there is another way to copy the table but not linking....

Thanks in advance.
Code:
[/FONT]
[FONT=Courier New]   Dim strSourceDB As String
   strSourceDB = "E:\Access\DAILY EXCERCISE\New folder\Database1.accdb"[/FONT]
[FONT=Courier New]   Dim dbSource As DAO.Database
   Dim tdf As DAO.TableDef
   
   DoCmd.SetWarnings False
   
   Set dbSource = DBEngine.OpenDatabase(strSourceDB)
   For Each tdf In dbSource.TableDefs
       If tdf.Name = "MyTable" Then
           DoCmd.TransferDatabase _
               acImport, _
               "Microsoft Access", _
               strSourceDB, _
               acTable, _
               tdf.Name, _
               tdf.Name
       End If
   Next tdf
   Set cnt = Nothing
   DoCmd.SetWarnings True[/FONT]
[FONT=Courier New]
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Pedie

Why is this the first thing that happens when the database is opened?
 
Upvote 0
Pedie

No, why is the first thing that happens the copying of tables from another database?
 
Upvote 0
Pedie

Why not do it after the database has opened?

For example, the database is opened and a form appears with some command buttons on it.

The user clicks the relevant command button to do the import.
 
Upvote 0
If you set macro security to low that warning *might* go away.

I'm starting to believe that with these multi-value fields you just want to put them in one database and leave them there!
 
Upvote 0
I sure hope this is a single user database that will NEVER be accessed by multiple users.

If multiple user can every edit eh same record then you will have major issues.

If it is multiple user, have you done any testing with multiple users yet? What you are basically doing is a form or replication. This is very difficult to due properly with an Access back end. In JET 4 it supported replication. It has since been depreciated in the new ACE (.accdb) format.

Access power is in using linked tables. This allows the real time sharing of data.

FWIW:
I have been watching your posts for a while. From what I have seen you are doing a lot of thing that will not allow Access to work at its best. I think your design will not allow the real-time sharing of data in a multi-user environment. You are doing a lot against the way Access was designed to work properly.

My observation is that you are not using Access strengths. You are doing things in a ways that Acess does not do well. If you can't use Access in a way to take advantage if Access's strengths as a development platform then Access may not be the best platform for you.
 
Upvote 0
I agree with you HiTechCoach...:)
I also came to know alot about what access is not good at working on this particular tool:biggrin:.
If i work on any other database i'll try my best to take advantage of Access great Features..esp. like linking table etc. Norie has been advicing on the same, i was going the other way access works....

Actually, the thing is that this work 'm doing right now is not multi user sharing data but just storing data and then specific users pull data later for analaysing it etc.

The only problem is to prevent one user from seeing other users data...:)

So far the tool is working perfectly with all the help i got from here...

Thanks again everyone!


FWIW:
I have been watching your posts for a while. From what I have seen you are doing a lot of thing that will not allow Access to work at its best. I think your design will not allow the real-time sharing of data in a multi-user environment. You are doing a lot against the way Access was designed to work properly.

My observation is that you are not using Access strengths. You are doing things in a ways that Acess does not do well. If you can't use Access in a way to take advantage if Access's strengths as a development platform then Access may not be the best platform for you.
 
Upvote 0
Pedie

If all you are using Access for is storage why don't you return the data to some other application for analysis.

Perhaps Excel, which has tools for analysis that Excel doesn't it.

If you were to do that then you would have more control, and it could be setup so the users don't even realise the data is being stored in Access.
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,462
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top