If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Open specific form in another database?
I'm trying to use a command button (cmdOpenLabels) on a switchboard
(F01_Switchboard) in one DB (PAYBACKS_8.0.mdb) to open another form (F02_CMLabelsDataEntry) in another DB (CM-DM_Downloads.mdb). Also, there is a different form in CM-DM_Downloads.mdb that needs to stay as the StartUp form. I created a macro (M01_OpenLabelForm) in CM-DM_Downloads.mdb using OpenForm to open F02_CMLabelsDataEntry. Then I created a macro (M07_OpenCMLabelsForm), triggered by cmdOpenLabels, using the following RunApp: "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "S:\HQ Common\DC Finance\DATA_ANALYSIS\PAYBACKS\CM-DM Downloads.mdb/x M01_OpenLabelsForm" I get the following when I try to run it: Microsoft Office Access can't find the database file 'S:\HQ Common\DC Finance\DATA_ANALYSIS\PAYBACKS\CM-DM Downloads.mdb/x M01_OpenLabelsForm.mdb.' (NOTE: I don't know why it is listing the .mdb at the end. That's not how it is entered in the command line.) Can somebody please help me out? If code is the best answer, can you specify where I need to substitute my info in your example? My code reading/writing skills are a work in progress. THANKS!!!!!!!! -- GD |
#2
|
|||
|
|||
Open specific form in another database?
"GD" wrote in message
... I'm trying to use a command button (cmdOpenLabels) on a switchboard (F01_Switchboard) in one DB (PAYBACKS_8.0.mdb) to open another form (F02_CMLabelsDataEntry) in another DB (CM-DM_Downloads.mdb). Also, there is a different form in CM-DM_Downloads.mdb that needs to stay as the StartUp form. I created a macro (M01_OpenLabelForm) in CM-DM_Downloads.mdb using OpenForm to open F02_CMLabelsDataEntry. Then I created a macro (M07_OpenCMLabelsForm), triggered by cmdOpenLabels, using the following RunApp: "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "S:\HQ Common\DC Finance\DATA_ANALYSIS\PAYBACKS\CM-DM Downloads.mdb/x M01_OpenLabelsForm" I get the following when I try to run it: Microsoft Office Access can't find the database file 'S:\HQ Common\DC Finance\DATA_ANALYSIS\PAYBACKS\CM-DM Downloads.mdb/x M01_OpenLabelsForm.mdb.' (NOTE: I don't know why it is listing the .mdb at the end. That's not how it is entered in the command line.) Can somebody please help me out? If code is the best answer, can you specify where I need to substitute my info in your example? My code reading/writing skills are a work in progress. THANKS!!!!!!!! You appear to have include the command-line argument in the quoted string that represents the database name. Although I don't work with macros much, try this for you argument to RunApp: "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "S:\HQ Common\DC Finance\DATA_ANALYSIS\PAYBACKS\CM-DM Downloads.mdb" /x M01_OpenLabelsForm Please note: that will have been broken onto multiple lines by the newsreader, but it should all be on one line. -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup) |
#3
|
|||
|
|||
Open specific form in another database?
Works great!! Thanks for saving my bacon, Dirk!
-- GD "Dirk Goldgar" wrote: "GD" wrote in message ... I'm trying to use a command button (cmdOpenLabels) on a switchboard (F01_Switchboard) in one DB (PAYBACKS_8.0.mdb) to open another form (F02_CMLabelsDataEntry) in another DB (CM-DM_Downloads.mdb). Also, there is a different form in CM-DM_Downloads.mdb that needs to stay as the StartUp form. I created a macro (M01_OpenLabelForm) in CM-DM_Downloads.mdb using OpenForm to open F02_CMLabelsDataEntry. Then I created a macro (M07_OpenCMLabelsForm), triggered by cmdOpenLabels, using the following RunApp: "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "S:\HQ Common\DC Finance\DATA_ANALYSIS\PAYBACKS\CM-DM Downloads.mdb/x M01_OpenLabelsForm" I get the following when I try to run it: Microsoft Office Access can't find the database file 'S:\HQ Common\DC Finance\DATA_ANALYSIS\PAYBACKS\CM-DM Downloads.mdb/x M01_OpenLabelsForm.mdb.' (NOTE: I don't know why it is listing the .mdb at the end. That's not how it is entered in the command line.) Can somebody please help me out? If code is the best answer, can you specify where I need to substitute my info in your example? My code reading/writing skills are a work in progress. THANKS!!!!!!!! You appear to have include the command-line argument in the quoted string that represents the database name. Although I don't work with macros much, try this for you argument to RunApp: "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "S:\HQ Common\DC Finance\DATA_ANALYSIS\PAYBACKS\CM-DM Downloads.mdb" /x M01_OpenLabelsForm Please note: that will have been broken onto multiple lines by the newsreader, but it should all be on one line. -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup) |
#4
|
|||
|
|||
Open specific form in another database?
Why?
What will having that form in the other DB open allow you to do? Is there a possiblity that you could link to the tables in that other DB and use a form in your 'first' DB? Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "GD" wrote in message ... I'm trying to use a command button (cmdOpenLabels) on a switchboard (F01_Switchboard) in one DB (PAYBACKS_8.0.mdb) to open another form (F02_CMLabelsDataEntry) in another DB (CM-DM_Downloads.mdb). Also, there is a different form in CM-DM_Downloads.mdb that needs to stay as the StartUp form. I created a macro (M01_OpenLabelForm) in CM-DM_Downloads.mdb using OpenForm to open F02_CMLabelsDataEntry. Then I created a macro (M07_OpenCMLabelsForm), triggered by cmdOpenLabels, using the following RunApp: "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "S:\HQ Common\DC Finance\DATA_ANALYSIS\PAYBACKS\CM-DM Downloads.mdb/x M01_OpenLabelsForm" I get the following when I try to run it: Microsoft Office Access can't find the database file 'S:\HQ Common\DC Finance\DATA_ANALYSIS\PAYBACKS\CM-DM Downloads.mdb/x M01_OpenLabelsForm.mdb.' (NOTE: I don't know why it is listing the .mdb at the end. That's not how it is entered in the command line.) Can somebody please help me out? If code is the best answer, can you specify where I need to substitute my info in your example? My code reading/writing skills are a work in progress. THANKS!!!!!!!! -- GD |
Thread Tools | |
Display Modes | |
|
|