| View previous topic :: View next topic |
| Author |
Message |
Bootkie2 Newbie

Joined: 06 Nov 2009 Posts: 4
|
Posted: Fri Feb 05, 2010 1:42 pm Post subject: Form Data Source Macro |
|
|
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 |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Fri Feb 05, 2010 1:48 pm Post subject: |
|
|
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 http://forum.openoffice.org |
|
| Back to top |
|
 |
Bootkie2 Newbie

Joined: 06 Nov 2009 Posts: 4
|
Posted: Tue Feb 09, 2010 7:31 am Post subject: |
|
|
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 |
|
 |
|
|
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
|