Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / March 2007

Tip: Looking for answers? Try searching our database.

How to Publish to 2 locations (offices) using the same form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Meg - 14 Mar 2007 13:17 GMT
I want to publish my form to 3 or 4  offices.  I
have already published it to our network drive here in my office and it
works fine.  Each Office has an identical Database in Access (which are blank
to start with, except for the lists I am using for the drop down lists) This
database is located the same place on those office's server as mine.  I need
for each office to be have separate databases as they have different
employees.

I want to use the same form as I am using here because I don't want to
recreate another form for each Access Database.  Can I publish my same form
to their locations. or a save as form to their locations.

Can someone help please.  I have tried everything that I know (which is not
a lot).

Thanks,

MEG
Zhang Haiguang - 14 Mar 2007 16:25 GMT
Hi Meg,

Maybe you could write some codes in the OnLoad event:
function XDocument::OnLoad(eventObj)
{
   if( user is one of depart1 ){
       XDocument.QueryAdapter.Connection = "connection for depart1
database";
   }else if( user is one of depart2 ){
       XDocument.QueryAdapter.Connection = "connection for depart2
database";
  }
}

Of course, you should can get the department of the current user...

InfoJet Service
InfoPath Web Form
[http://www.infojetsoft.com]
Meg - 14 Mar 2007 17:03 GMT
WOW!  I am not sure I know how to do this, but if you could point me to how I
actually get to the OnLoad Event, I will try.  Basically the only coding I
have done is on the OnClick Event and only a couple lines.  I don't suppose
there is a simpler way??  Or at least help some more with the code.  for
example, the file I think I would refer to is Office_Name_ID in my access
database.  or am I way off base?

Thanks,

MEG

> Hi Meg,
>
[quoted text clipped - 15 lines]
> InfoPath Web Form
> [http://www.infojetsoft.com]
Zhang Haiguang - 14 Mar 2007 17:39 GMT
For the OnLoad Event, please click the menu Tools -> Programming-> On Load
Event ...
In my solution, you must know the deparment of the current user running the
current InfoPath form first, then you can switch the connection.
Only you know how to get it...

Or, if you allow user to switch the connection by themself( such as made the
selection on a dropdown box ), the thing will be easy.
Sorry, I don't know the simpler way...

> WOW!  I am not sure I know how to do this, but if you could point me to
> how I
[quoted text clipped - 28 lines]
>> InfoPath Web Form
>> [http://www.infojetsoft.com]
Meg - 14 Mar 2007 18:46 GMT
Thanks very much.  You are awesome!  Now that you told me where to find the
On Load Event I think I can at least attempt putting the code in it and maybe
even get it to work.  I never even thought to look under a menu option.

thanks again!

MEG

> For the OnLoad Event, please click the menu Tools -> Programming-> On Load
> Event ...
[quoted text clipped - 38 lines]
> >> InfoPath Web Form
> >> [http://www.infojetsoft.com]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.