473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Can I put a password into my VBA code when Importing a table

MattFitzgerald
I am using the below code to import a table when the code run I get a pop up box asking me for the password for the database I am importing from.

Is it possible to put the password into my code so I do not receive the password prompt?

Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferDatabase acImport, "Microsoft Access", "C:\Documents and Settings\fitzgem4\Desktop\2008_2009 V5.mdb", acTable, "Tbl_VOL_References", "Tbl_VOL_References_StratfordData", False
I have been trying to figure this out for about 2 hours so any help would be very much appreciated, Matt Fitzgerald.
Mar 3 '08 #1
4 1699
cori25
83
Did you try just linking the table into access.....
Mar 3 '08 #2
Did you try just linking the table into access.....
To be honest I had not realy given linking the tables any consideration as I am not certain how that works.

I am pulling data from 2 databases as we have 2 sites and the data from the other location is downloaded by broadband link and the database I am importing to is for running reports so my thoughts are each time I run a report with linked tables I am going to have to wait while the data is refreshed from the remote site.

Your suggestion has made me consider linking the tables. This is possibly a good idea as I could run a make table query off the linked tables and run my reports and queries off the new tables which would mean I would not be refreshing the data every time.

This is all based on my assumptions on how I think linked tables work, please can someone correct me if I am wrong or let me know if there is a more optimum soloution?

Thank you, Matt Fitzgerald
Mar 4 '08 #3
cori25
83
Your assumptions about linking tables are correct. I feel this would be the best approach for you.

In regards to the data refreshing...

I save the data as a table

I create a macro to which runs a delete query to clear the table and then a Transfer Spreadsheet to import data from the specified location to the table.

I run this everytime I run my report so that the table that I run my queries off of is refreshed.

You can also do it the way you stated.

I think this would be your best approach.
Thanks
Mar 5 '08 #4
Thankyou for all your help
Mar 10 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jordy | last post by:
Environment: Sun servers running solaris 2.8 Php 4.3.6 Apache 1.3.29 Mysql 4.1.1 phpMyAdmin 2.6.0-alpha1 phpAds 2.0 PhpMyadmin and phpAds don't succeed to connect the MySql database when
3
by: Chris | last post by:
I have a frontend that has some tables which are linked to a backend. Now I want to make the backend password protected and when I try to run it password protected I can't open it. In the first...
4
by: Neil Ginsberg | last post by:
I have ODBC linked tables to a SQL 7 database in an A2K database. The linked tables do not have the password stored in them, so the first time the user accesses them, they need to enter the SQL...
3
by: MissiMaths | last post by:
I have used outputTo to export a copy of a table out of access into excel. I was wondering if there is anyway to set a password on this within the code so that it is read only in .xls format? I...
13
by: dixie | last post by:
I want to have a password that will change for each month. If I had a table with a field of 'Month' with the number of the month and another field called 'Password' that had twelve records. What...
4
by: Geir Baardsen | last post by:
Hi! 1. I wonder if there is a possibility to open a BackEnd.Db from the opening form, the form e.g.: frmOrders, in the FrontEnd.Db, when the BackEnd.Db is password protected? 2. Do I need to do...
2
by: Jill Elaine | last post by:
I am building an Access 2002 frontend with linked tables to an encrypted Paradox 7 database. When I first create these linked tables, I'm asked for the password to the encrypted Paradox database,...
1
by: dan.cawthorne | last post by:
Hi all, Need Some Help With A Simple Password Form What a I Have Is Single Field Table, With One Record In It The Field is Called table is also called "Password" which ive created a form...
3
by: RachH | last post by:
I import tables from one Access 2003 database into another 1x/day (for various reasons, linking tables does not meet the need). The database I am importing from is password protected at the general...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.