OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Form Data Source Macro

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
Bootkie2
Newbie
Newbie


Joined: 06 Nov 2009
Posts: 4

PostPosted: Fri Feb 05, 2010 1:42 pm    Post subject: Form Data Source Macro Reply with quote

Hi,
Im a newbie to Base. I have a Database.odb on a shared network. I'm using a writer.ODT as front end on two different machines. Everytime, before I close writer I have to go into form design view (then form properties), and change the data source to the "Bibliography.odb" that comes pre loaded with open office, just so that when I use the .odt file on my other machine it wont cause an error. Is there a quick macro that can change the data source, save and then shut down Writer?? I tried recording one and it didnt seem to work, Any advice would be greatly appreciated. I just want to be able to input data from either machine. Thanks.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Fri Feb 05, 2010 1:48 pm    Post subject: Reply with quote

Binding the form should simply work. Do not try repair macros. FInd the cause of the problem. Rotten operating system with obscure system of file permissions?
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Bootkie2
Newbie
Newbie


Joined: 06 Nov 2009
Posts: 4

PostPosted: Tue Feb 09, 2010 7:31 am    Post subject: Reply with quote

So I need to use some type of Binding Data Control....What exactly would I have to switch in this code?? Is it the "com.sun.star.beans.PropertyValue"?? Do I need something like com::sun::star::form::DataAwareControlModel"Bibliography.odb".

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "SwitchControlDesignMode"
args1(0).Value = true

dispatcher.executeDispatch(document, ".uno:SwitchControlDesignMode", "", 0, args1())

rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "FormProperties"
args2(0).Value = true

dispatcher.executeDispatch(document, ".uno:FormProperties", "", 0, args2())

rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "ShowProperties"
args3(0).Value = false

dispatcher.executeDispatch(document, ".uno:ShowProperties", "", 0, args3())

rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "ShowProperties"
args4(0).Value = false

dispatcher.executeDispatch(document, ".uno:ShowProperties", "", 0, args4())
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group