A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Open specific form in another database?



 
 
Thread Tools Display Modes
  #1  
Old December 16th, 2009, 03:24 PM posted to microsoft.public.access.gettingstarted
gd
external usenet poster
 
Posts: 209
Default 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  
Old December 16th, 2009, 04:26 PM posted to microsoft.public.access.gettingstarted
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default 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  
Old December 16th, 2009, 04:48 PM posted to microsoft.public.access.gettingstarted
gd
external usenet poster
 
Posts: 209
Default 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  
Old December 16th, 2009, 04:51 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.