Access 2003 and/or 2007 copy in objects from another mdb

Is is possible to write code in an Access MDB that will allow a user to 
select another Access MDB and then see a list of report and/or queries so 
they can select from the list.  Then programatically copy in those objects 
from another mdb in to the current mdb?  I know that access allows for the 
exporting and importing of objects but I have a need to do this 
programatically.
0
Utf
3/25/2010 1:26:01 PM
access.modulesdaovba 1670 articles. 0 followers. Follow

1 Replies
1224 Views

Similar Articles

[PageSpeed] 7

Sure, it can be done.  Here are the general outlines:

1) Use the Open/Save API that you can find here: 
http://www.mvps.org/access/api/api0001.htm to select the database file you 
want to inspect.
2) Programmatically link the MSysObjects table from that selected database 
(it's hidden and system, but it's there) into your database.
3) Create a query based on this linked table that displays the Name and Type 
field.  Filter the query for types: -32764 and  -32768, like this:

SELECT DISTINCTROW Mid([Name],4) AS Expr1, MSysObjects.Type
FROM MSysObjectsRemote
WHERE Type=-32764 OR Type =-32768
ORDER BY MSysObjects.Name;

4) Use this query as the Row Source for a Multi-select Listbox on a form.
5) In code:
    a) Step through the seleted values of the listbox
    b) Use the "DoCmd.TransferDatabase acImport..." method to copy the 
select reports and queries to your database.

On my website (www.rogersaccesslibrary.com), there are several small sample 
database which illustrate portions of these:

ChooseReportFromList2-2k.mdb
MultiSelectListboxes2k.mdb
LinkTables2k.mdb

-- 
--Roger Carlson
  MS Access MVP
  Access Database Samples: www.rogersaccesslibrary.com
  Want answers to your Access questions in your Email?
  Free subscription:
  http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L



"Matthews_416" <Matthews_416@discussions.microsoft.com> wrote in message 
news:55C43E0E-C470-4E63-A16E-F73BB6FC8C31@microsoft.com...
> Is is possible to write code in an Access MDB that will allow a user to
> select another Access MDB and then see a list of report and/or queries so
> they can select from the list.  Then programatically copy in those objects
> from another mdb in to the current mdb?  I know that access allows for the
> exporting and importing of objects but I have a need to do this
> programatically. 


0
Roger
3/25/2010 4:02:26 PM
Reply:

Similar Artilces:

Restricting access to note attachments
Hi all, is there a way to restrict access to attachments on notes to specified users. I know we can, using the Security Roles, define who can and can't read/ write the notes fields but we would like our users to be able to view the note, but not open the attachment(s) unless they are the owner of that note (or at least in the business unit, etc.). I know this could be done for Word/ Excel files in Office (Password protection) but are looking for something more encompassing for all attachments inside CRM. Thanks, -- Matt Pring On Oct 21, 3:54=A0pm, Matt Pring <MattPr...@discus...

Outlook Web Access AutoSignature
I would like to know if it's possible to have autosignature in Outlook Web Access, and if so how to implement it. If anyone can help, it would be greatly apreciated. Thank You. It depends on the version of Exchange - Outlook Web Access is a function of Exchange, not Outlook. Exchange 2003 does this natively, previous versions may have a third party add-in that will allow users to do this. For better information, post in an exchange group such as microsoft.public.exchange.admin. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due t...

Menu Change back to 2003
Does anybody can tell me how to change the word word 2007 menu back to word 2003 menu?Word 2007 is a nightmare for me! Hi Bo, You can't. However, there are various Add-ins that people have produced to mimick the old toolbars. -- Cheers macropod [Microsoft MVP - Word] "Bo" <Bo@discussions.microsoft.com> wrote in message news:D2269CDD-43F0-4138-BB86-07E685A1AFA8@microsoft.com... > Does anybody can tell me how to change the word word 2007 menu back to word > 2003 menu?Word 2007 is a nightmare for me! As macropod suggests there are add-ins that mim...

Exchange 2003 Email forwarding by Schedule
Hi, I have been looking for some VB code example, without any luck, on forwarding Exchange 2003 email accounts to another email account within exchange using a script. I need to forward and unforward on a schedule. Can anyone direct me to some info that would help me acheive this. Regards Brent Might not be a good solution but: AD Attrib altRecipient is the forward to option. You can easily put a script in place that will modify this value to a single user and then schedule the script to change the forward to as required. Of course AD replication is required after the change and it ...

Copy contents of cells if cell contains information
I have a column of cells, say A1:A30 in a few different spreadsheets. Some of these spreadsheets contain information within these cells (not formulae, but just typed info) and some don't contain information. Now, in a new spreadsheet, I would like to copy the contents of these cells (columns) if there is information in them. So for example, in spreadsheet 1, i have information, speadsheet 2 i don't, spreadsheet 3 I do, i would like my information to be copied into a new cell as follows:- information 1 information 2 Any advice? Thanks Hi, Test this on sample (or backed-up) work...

outlook 2003 custom rules and spam filtering
I'm trying to set up rules to move emails from different accounts to different folders. The rules work fine except that spam filtering is not being processed on the accounts that get moved. In other words, I have one "main" account that I have go to the inbox - it has the spam rules apply. The other "secondary" rules go to specific folders - they do not have the spam being processed. Sounds like my custom rule is pre-empting the spam filter rule(s). Is there a way to chain the two together so that spam filtering happens first and then the mover (or vice versa ...

Access 2003 and Access 2007 Synchronization
I'm setting up a new business relationship with a company in Portugal. They use Access 2003. I have just bought MS Office Professional 2007 (with Access 2007). Our plan is that they will send, once a month or so, their Access db then we will update and add to that db and then return it after another month or so. There probably won't be a lot of updates on our end so the monthly cycle should work. After they synchronize, they will send a new version of the db and we will start over. My goal is to keep everything as simple as possible partially because I don't know how skillf...

Excel Row to Access Columns
Hi, I have a single row in Excel with a lot of data, what I need to do is move that to a column in Access. I need some way to automate that. I know the easiest way to do that would to just transpose it in excel and then import in access.But I cant do that as I just get that excel file with one row and I need some way to automate the process in Access. thanks m -- mk389 ------------------------------------------------------------------------ mk389's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=15272 View this thread: http://www.excelforum.com/showthread.php?...

Hot link in office outlook 2003 inoperatable
When I click a hot link in my Outlook 2003 I don't get any action, what settings do I need to make this happen, I always could perform this in Outlook Express all versions. Hot Links that are in blue letters. John in Ks ka0mow wrote: > When I click a hot link in my Outlook 2003 I don't get any action, what > settings > do I need to make this happen, I always could perform this in Outlook > Express all versions. Hot Links that are in blue letters. John in Ks You mean a "Hyper link, not a "hot" link. Have you installed IE7? -- Registered Linux User no 24...

Help displaying a random record in a form--Access newbie
Hello, I am new to Access, so if anyone can help me, please assume I know absolutely nothing! I currently have a table with two columns, ID and CHORE. In each row, the ID number corresponds to a chore that I have entered. I would like to create a form with a button and a text field such that when I press the button, a random chore is displayed in the text field (supposed to make chores more "fun" for my son). There is no need to remove this record from future clicks (the same record can come up over and over without any problem for me) Can anyone explain to me (in pai...

How to remove the Outlook 2003 system tray icon
Hi, Somebody please tell me that there is an option to remove the rather redundant icon Outlook 2003 places in the system tray area! I've been through the options many times but can't seem to find any way of getting rid of it. Thanks muchly Paul You can't get rid of it. You can however hide it. Just right click the Task Bar. Choose Properties. Choose Customize. You can set the Outlook Icon to always hide (in Windows XP only). -- Patricia Cardoza Outlook MVP www.cardozasolutions.com Author, Special Edition Using Microsoft Outlook 2003 ***Please post all replies to the new...

Access
Hi My form takes a few moments to load up as it is fairly substantial SQL statement is there a way to get something to display a graphic or 'loading...' message to appear why it calculate the contents? Steve ...

Code does not work after converting MDB to MDE
Hello all, I'm using the code described in KB article(see link below) to print a report on legal paper in landscape mode, however the code no longer works when I convert the database the Access 97 database from MDB to MDE. Any thoughts on how I get around this? Thanks, Rohit Thomas http://support.microsoft.com/default.aspx?scid=kb;en- us;302650&Product=acc97 Rohit, The code fails at the following statement: DoCmd.OpenReport strName, acDesign when run in an .mde, because by definition an .mde does not allow for objects like forms and reports to be opened in design view, like ...

Copy columns into rows
Can anyone advise me how to copy columns of contiguous cells, into a much easier to read row of contiguous cells? hi, copy the column. select a cell in column a. goto edit>paste special>transpose >-----Original Message----- >Can anyone advise me how to copy columns of contiguous >cells, into a much easier to read row of contiguous cells? >. > Don't forget, only 256 columns, which means only that many rows can be moved to a *single* row. Select the column(s), Right click in the selection and choose "Copy". Right click in the first cell of the row to rece...

Outlook 2003 setup
Thanks for the help so far, everyone. Is there a way to get outlook to send/receive email from a free yahoo account? Ta. Check out this site: http://www.ypopsemail.com/ "cameleonkelle" <cameleonkelle@discussions.microsoft.com> wrote in message news:9FA06750-130F-44EA-B114-063B88DC6FC9@microsoft.com... > Thanks for the help so far, everyone. > Is there a way to get outlook to send/receive email from a free yahoo > account? > Ta. ...

access mail on WEB
Is there a way i can check emails from exchanger server 5.5 from an internet browser. I have Exchange 5.5 in win NT 4.0. Thanks! Yes - install OWA (Outlook Web Access) and open up the needed ports in your firewall (80 for http; better to use SSL and port 443 instead). disk0nek wrote: > Is there a way i can check emails from exchanger server > 5.5 from an internet browser. > > I have Exchange 5.5 in win NT 4.0. > > Thanks! ...

Money 2003 password problems
Hi, I run Windows XP and Money 2003. I recently moved all my "c:\documents and settings" to another drive, which involved me having to make registry changes so windows knew where the "My documents" and "Shared Documents" had moved to. Everything worked fine, although I had some problems with MS money after the move so I uninstalled it and reinstalled it again (the exact same version). Since I have reinstalled it, the password I used to use to open my money file is not recognised. I am 100% certain that I am using the correct password. I tried using salv.exe to...

word 2007 document prints every other line of text.
word 2007 document started printing every other line of type as of yesterday. Document shows okay in print preview, but prints incorrectly. If Print Preview appears OK and you are using an Inkjet printer, I would suspect that you have a problem with the ink nozzles in the printer. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "bh" <bh@discussions.microsoft.com> wrote in message news:C2A0B201-CA31-4482-B538-B...

access or mount mirrored hard disks
Hi, is it possible to access a mirrored harddrive? or mount the mirrored volume by using api or mfc commands? Thank you in advance Wimpi ...

can you make one worksheet update another
I have two similar worksheets within the same workbook. One sheet is sorted by name and the other sheet is sorted by a date for a speicfic name. Is there a way to change the date on the sheet, sorted by name, and that will automatically find the name on the other sheet(sorted by date) and change the date to the second sheet? Jaime, The normal way is to have one table, and sort it as needed when needed. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Jaime S." <Jaime S.@discussions.microsoft.com> wrote in mess...

CRM v4 Accessibility Improvements
Hi all: Does anyone know if any improvements have been med to CRM v4 in the area of accessibility for handicapped users? One of my customers has a user who is blind and they need to make the software accessible to him. Thanks in advance for any and all help. John. Hi John, We have added following Accessibility features in CRM 4.0 : 1) High Contrast Mode (Tools --> Options --> General Tab --> Enable high contrast settings) 2) All the Form input elements have <LABEL FOR> to aid in screen readers. 3) All the Images have a ALT tag (for non text elements) etc. Thanks! Ma...

Access Database In Great Plains
I was wondering if anyone knew how to have the databases that are stored in access transfered over to great plains. I'm current running version 8.0 any help would be greatful. thanks Search Customer Source for integration Manager. MS Access databases can be used as a data source. Vincev "jake" wrote: > I was wondering if anyone knew how to have the databases that are > stored in access transfered over to great plains. I'm current running > version 8.0 any help would be greatful. thanks > > Hi Jake, Is this something you need to do regularly or is it ...

Upsizing Access to SQL Server 2000
Hello, I am new to SQL Server. I am trying to use the Database upsizing wizard to upsize a Access 2000 database into SQL Server 2000. They are both on the same machine (running Win 03 Server). I cannot connect to the SQL Server. Error as below: Connection failed: SQLState: '01000' SQL Server Error: 14 [Microsoft][ODBC SQL Server Driver][Shared Memory] ConnectionOpen(Invalid Instance()). SQLState: '08001' SQL Server Error: 14 [Microsoft][ODBC SQL Server Driver][Shared Memory]Invalid connection. ...

Charts Excel 2003
I have several Dynamic Charts that plot daily data and a Month to date value. I show the data table. I am using line charts, and adding a Trendline. How can I show the Month To Date value without having it affect the daily trendline? You shouldn't include the MTD value as part of the daily value series. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Gringarlow" <Gringarlow@discussions.microsoft.com> wrote in message news:8CD46CAB-4A3F-457A-8C6B-03FF488C0011@microsoft.c...

Outlook Web Access #19
We have have OWA at my work and I would like to configure Outlook 2003 to synchronize with my desktop at work, is this possible Thanks B ...