<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dale</id>
	<title>Apache OpenOffice Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dale"/>
	<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/wiki/Special:Contributions/Dale"/>
	<updated>2026-05-25T06:50:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17886</id>
		<title>MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17886"/>
		<updated>2006-10-02T23:15:10Z</updated>

		<summary type="html">&lt;p&gt;Dale: /* Using a query */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Common questions and answers for those migrating from MS Access to OO.o Base.&lt;br /&gt;
&lt;br /&gt;
This is a user community effort - add to the knowledge base if you can.&lt;br /&gt;
&lt;br /&gt;
Please however try to keep the questions and answers general. If there is an answer regarding a feature specifc version of MSA then include the version number also.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Specifically, please only update the wiki if you have an answer for the question you are adding.&amp;#039;&amp;#039;&amp;#039; ( &amp;#039;&amp;#039;If you may need to get back shortly with the answer don&amp;#039;t let that stop you from getting the queston in first however - just come back before long&amp;#039;&amp;#039; ) &lt;br /&gt;
&lt;br /&gt;
For asking &amp;#039;&amp;#039;&amp;#039;specific questions&amp;#039;&amp;#039;&amp;#039; or for general help it would be appropriate to then ask on either the:&lt;br /&gt;
[http://www.oooforum.org/forum/viewforum.phtml?f=10 Base Forum] &lt;br /&gt;
or on  &lt;br /&gt;
[http://dba.openoffice.org/servlets/ProjectMailingListList the Base users mailing list].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can I use Microsoft Access databases (.mdb) in Base? ==&lt;br /&gt;
&lt;br /&gt;
On Windows: yes. You cannot open them directly via &amp;lt;code&amp;gt;File|Open&amp;lt;/code&amp;gt;, but you can access the data therein. For this, you need the [http://msdn.microsoft.com/data/ref/mdac/downloads Microsoft Data Access Components], which are available from Microsoft for free. (In Windows XP, they&amp;#039;re already included, so you need them for older Windows versions only.)&lt;br /&gt;
&lt;br /&gt;
Then, go to &amp;lt;code&amp;gt;File|New|Database&amp;lt;/code&amp;gt;, choose &amp;quot;Connect to an existing datbase&amp;quot;, and select the &amp;quot;Microsoft Access&amp;quot; database type from the list. On the next page, you then select the .mdb file you want to access - that&amp;#039;s it!&lt;br /&gt;
&lt;br /&gt;
This will allow you to read and update the data in your Acess tables.&lt;br /&gt;
&lt;br /&gt;
You cannot read / modify or use the Access forms, queries, or reports.&lt;br /&gt;
&lt;br /&gt;
== Can I read my Base database from MS Access? ==&lt;br /&gt;
There is no way to use the table linking mechanisim in Access to connect to a Base database.&lt;br /&gt;
&lt;br /&gt;
It is possible for a Base database to update data in the Access database. At this time this will require however that the Access database be opened and locked by the Base file.&lt;br /&gt;
&lt;br /&gt;
Data could also be passed back to the Access database by creating a linked CSV file in the Base database. Then linking to this CSV file to a table in the Access database.&lt;br /&gt;
&lt;br /&gt;
== Can I create an Access database (mdb file) with Base? ==&lt;br /&gt;
&lt;br /&gt;
No. Base can not create a new Access database file; or new tables, queries, forms etc. within an existing mdb file.&lt;br /&gt;
&lt;br /&gt;
== Can I create a Switchboard in Base? ==&lt;br /&gt;
&lt;br /&gt;
Base does not currently have a switchboard style form wizard. It is possible to achieve a very similar effect however using either of two techinques.&lt;br /&gt;
&lt;br /&gt;
=== Opening a default form via a macro ===&lt;br /&gt;
&lt;br /&gt;
=== Using a stand alone form to launch the Base database ===&lt;br /&gt;
== Our Access databases uses &amp;quot;Workgroup Security&amp;quot; to control group/user permission to view/maintain data? ==&lt;br /&gt;
&lt;br /&gt;
This question points out what is a fundamental difference between OOoBase and MSAccess . In the case of MSA (MS Access) there is one and only one database engine in use - although you may link tables in MSA to external datasource - MS Jet is still the only database engine actually used by MSA.&lt;br /&gt;
&lt;br /&gt;
In Base (OOoBase) this is not the case at all. The Base database document is simply a front end ( client application ) to a variaty of database engines. In one of these forms it embeddeds a HSQLDB database into the ODB file itself, many people simply see this as the only Base database format. That is totally mistaken. In this instance of an embedded database there is no support for multiple users and of course no support for groups therefore. However, that is only one of the ways Base can be configured.&lt;br /&gt;
&lt;br /&gt;
You are free to use Base as the front end to a HSQLDB database in server mode. HSQLDB is a very small footprint, low administraton database engine and in server mode has full support for users / groups. For larger numbers of users you could just as easily configure Base to work with MySQL, PostgrSQL, Firebird, Oracle or MS SqlServer.&lt;br /&gt;
&lt;br /&gt;
There is another significant difference between MSA and Base regarding this then. In MSA you would deploy one MDB (or one of its variants ) file, then have each user in the workgroup see this file and open it.&lt;br /&gt;
&lt;br /&gt;
In Base each user would have their own ODB file and each of these would be connected to the shared data server. In this way each user would have their own space for custom queries and reports - but it makes distribution of common forms, queries and reports more work.&lt;br /&gt;
&lt;br /&gt;
== Is a Form in Base different from a Form in MSA? ==&lt;br /&gt;
&lt;br /&gt;
Yes&lt;br /&gt;
&lt;br /&gt;
There are very real differnces between how Forms are implemented in Access and Base. &lt;br /&gt;
&lt;br /&gt;
=== Virtual forms within Base forms ===&lt;br /&gt;
&lt;br /&gt;
== Where are the Delete / Upate queries? ==&lt;br /&gt;
Base does not currently support building delete / insert / update queries in the desinger.&lt;br /&gt;
&lt;br /&gt;
=== equivilant actions === &lt;br /&gt;
==== &amp;#039;&amp;#039;using the Query Designer&amp;#039;&amp;#039; ====&lt;br /&gt;
You can achieve the equivilant actions in the GUI using the designer and or SQL commands.&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;using a macro&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
== I want to filter my form based on the contents of a combobox? ==&lt;br /&gt;
&lt;br /&gt;
== Converting my VBA modules to Base modules ==&lt;br /&gt;
&lt;br /&gt;
=== What happened to me? ===&lt;br /&gt;
&lt;br /&gt;
There is no exact duplicate to the ME psuedo variable in VBA. &lt;br /&gt;
&lt;br /&gt;
In Access VBA &amp;#039;me&amp;#039; has attributes of two seperate objects in OOoBasic: &lt;br /&gt;
TextDocument and DataForm&lt;br /&gt;
&lt;br /&gt;
The TextDocument object would be used for controlling the window size and placement on the screen for instance. &lt;br /&gt;
&lt;br /&gt;
The DataForm meanwhile supports result set functions, such as First, Filter, InsertRow.&lt;br /&gt;
&lt;br /&gt;
In OOoBasic the psuedo variable thisComponent normaly would be the TextDocument, while thisComponent.DrawPage.Forms(0) meanwhile would reference the first DataForm owned by the TextDocument.&lt;br /&gt;
&lt;br /&gt;
Perhaps a still closer equivilant is to use the object ownership hierarchy to get to the form. For example if we had a single table form with a button, then in the macro called by the &amp;#039;onClick&amp;#039; or as OOBase calls it the &amp;#039;When initializing&amp;#039; event we would do this: Create a macro in a library named onButtonClick( oEv as object )&lt;br /&gt;
&lt;br /&gt;
    sub onButtonClick( oEv as object )&lt;br /&gt;
      &amp;#039; oEv is the event object passed automatially&lt;br /&gt;
      &amp;#039; it has a property SOURCE which is the &lt;br /&gt;
      &amp;#039; button that initiated this call&lt;br /&gt;
    &lt;br /&gt;
      dim oForm as variant&lt;br /&gt;
    &lt;br /&gt;
      oForm = oEv.Source.Model.Parent&lt;br /&gt;
       &amp;#039; oForm is now the virtual form objct&lt;br /&gt;
      &lt;br /&gt;
      dim oDocument as variant&lt;br /&gt;
      &lt;br /&gt;
      oDocument = thisComponent&lt;br /&gt;
       &amp;#039; oDocument is now the textDocument displayed in&lt;br /&gt;
       &amp;#039; the window on screen&lt;br /&gt;
    &lt;br /&gt;
    end sub&lt;br /&gt;
&lt;br /&gt;
=== Where is findfirst? ===&lt;br /&gt;
&lt;br /&gt;
Base does not appear to have a FindFirst function on the rowset like MS Access, what is the equivilant Base function?&lt;br /&gt;
&lt;br /&gt;
MSAccess VBA example:&lt;br /&gt;
&lt;br /&gt;
Say there is a VB combo box which lists all the prospects in the database and allows the user to select a particular prospect and then have the form automatically go to that person&amp;#039;s data record.&lt;br /&gt;
&lt;br /&gt;
  Private Sub Find_Combo_AfterUpdate()&lt;br /&gt;
  Dim strCriteria As String&lt;br /&gt;
  &lt;br /&gt;
  strCriteria = &amp;quot;[Prospect_ID] =&amp;quot; &amp;amp; Me.Find_Combo&lt;br /&gt;
  &lt;br /&gt;
  Me.recordsetclone.FindFirst (strCriteria)&lt;br /&gt;
  If me.recordsetclone.NoMatch Then&lt;br /&gt;
      MsgBox &amp;quot;No entry found&amp;quot;&lt;br /&gt;
  Else&lt;br /&gt;
      Form_F_Prospects.Bookmark = me.recordsetclone.Bookmark&lt;br /&gt;
  End If&lt;br /&gt;
  &lt;br /&gt;
  End Sub&lt;br /&gt;
&lt;br /&gt;
For this type of simple single column search it is easy enough to create our own find first equivilant with OOoBasic:&lt;br /&gt;
&lt;br /&gt;
 Sub Find_Combo_AfterUpdate( OEv as Object)&lt;br /&gt;
    &amp;#039; Oev is the event object automatically sent&lt;br /&gt;
    &amp;#039; to sub procedure call&lt;br /&gt;
    &amp;#039; Oev will have a property Source&lt;br /&gt;
    &amp;#039; that is the control that triggered&lt;br /&gt;
    &amp;#039; the call to this procedure&lt;br /&gt;
  &lt;br /&gt;
  Dim oForm as variant &amp;#039; The dataform obejct &lt;br /&gt;
  &lt;br /&gt;
  Dim oComboBox as variant &amp;#039; The combobox control&lt;br /&gt;
  &lt;br /&gt;
  Dim oBkMark as variant&lt;br /&gt;
  &lt;br /&gt;
  oForm = oEv.Source.Model.Parent&lt;br /&gt;
  &lt;br /&gt;
  oComboBox = oForm.getByName( &amp;quot;Find_Combo&amp;quot; )&lt;br /&gt;
    &lt;br /&gt;
  oBkMark = FindFirst( oForm.CreateResultSet(), &amp;quot;Prospect_ID&amp;quot;, oComboBox.Text )&lt;br /&gt;
      &amp;#039; oForm.CreateResultSet() is equivilant here to me.recordsetclone&lt;br /&gt;
  if not IsEmpty( oBkMark ) then&lt;br /&gt;
  		oForm.moveToBookmark( oBkMark )&lt;br /&gt;
  else&lt;br /&gt;
  	msgBox( oComboBox.Text &amp;amp; &amp;quot; not found&amp;quot; )&lt;br /&gt;
  end if&lt;br /&gt;
  &lt;br /&gt;
 end sub&lt;br /&gt;
&lt;br /&gt;
 function FindFirst( oRS as variant, ColName as string, SearchVal as string ) as variant&lt;br /&gt;
        &amp;#039; oRS is a resultSet object&lt;br /&gt;
        &amp;#039; ColName is the name of a column in the resultset&lt;br /&gt;
        &amp;#039; SearchVal is&lt;br /&gt;
    dim colIDX as integer&lt;br /&gt;
    dim NotFound as variant&lt;br /&gt;
  &lt;br /&gt;
    FindFirst = notFound&lt;br /&gt;
    colIDX = oRS.FindColumn( ColName )&lt;br /&gt;
        oRS.First&lt;br /&gt;
        do &lt;br /&gt;
          if oRS.getString( colIDX ) &amp;lt;&amp;gt; Searchval&lt;br /&gt;
            oRS.Next&lt;br /&gt;
            if oRS.isAfterLast then&lt;br /&gt;
              exit do&lt;br /&gt;
            endif&lt;br /&gt;
          else&lt;br /&gt;
            FindFirst = oRS.getBookMark&lt;br /&gt;
            exit do&lt;br /&gt;
          end if&lt;br /&gt;
    while oRS.isAfterLast &amp;lt;&amp;gt; True&lt;br /&gt;
  &lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
=== How do I set the filter for a sub-form only? ===&lt;br /&gt;
&lt;br /&gt;
=== Is there an equivilant to DoCmd RunSQL ===&lt;br /&gt;
&lt;br /&gt;
Yes, in OOoBase you would use either a Statement or PreparedStatement object to achieve the same function. With OOoBase you must also decide between using execute and executeUpdate.&lt;br /&gt;
&lt;br /&gt;
For example if you had the VBA line&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;SELECT * FROM tContacts&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
it would become in OOoBase&lt;br /&gt;
  &lt;br /&gt;
  Dim oStatement as variant&lt;br /&gt;
  &lt;br /&gt;
  oStatement = OForm.ActiveConnection.CreateStatement&lt;br /&gt;
    &amp;#039; Where oForm is a DataForm object&lt;br /&gt;
    &amp;#039; NOTE you could do exactly the same thing with&lt;br /&gt;
    &amp;#039; a resultSet or rowSet obejct also&lt;br /&gt;
    &amp;#039; oStatement = OResultSet.ActiveConnection.CreateStatement&lt;br /&gt;
  &lt;br /&gt;
  oStatement.execute( &amp;quot;SELECT * FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot;&amp;quot;  )&lt;br /&gt;
  &lt;br /&gt;
If on the other hand the VBA line where&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;DELETE FROM tContacts WHERE Status = &amp;#039;INACTIVE&amp;#039;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
then we would use the executeUpdate method on a statement&lt;br /&gt;
&lt;br /&gt;
  oStatement.executeUpdate( &amp;quot;DELETE FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot; WHERE &amp;quot;&amp;quot;Status&amp;quot;&amp;quot; = &amp;#039;INACTIVE&amp;#039;&amp;quot;  )&lt;br /&gt;
&lt;br /&gt;
The rule is - &lt;br /&gt;
*if your SQL statement will return records you use execute or executeQuery.&lt;br /&gt;
*if the SQL statement returns no records then you must use executeUpdate.&lt;br /&gt;
&lt;br /&gt;
== If I use Lookup fields/columns in my  Access tables what can I do in Base? ==&lt;br /&gt;
There are two parts to this answer, given that Base does not support Lookup column types in tables.&lt;br /&gt;
&lt;br /&gt;
When a table is displayed in a custom form use of a bound listbox will give you the same functionality. An example of [[adding a listbox to a form]] and to a grid control on a form is at this page.&lt;br /&gt;
&lt;br /&gt;
In a table view ( double clicking on the table name ) there is no equivilant to this.&lt;br /&gt;
&lt;br /&gt;
==How do I use Domain Aggregate functions in Base?==&lt;br /&gt;
&lt;br /&gt;
Domain Aggregate functions such as &amp;#039;&amp;#039;&amp;#039;DCount&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;DLookup&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;DMax&amp;#039;&amp;#039;&amp;#039; etc have no direct equivalent in Base. You will have to write or design queries to return these results using the appropriate SQL functions.&lt;br /&gt;
&lt;br /&gt;
==How do I add Calculated Controls to my forms and reports?==&lt;br /&gt;
&lt;br /&gt;
Controls in Base forms and reports cannot be used to perform calculations. There are two methods available to get a calculated result on a form or report.&lt;br /&gt;
&lt;br /&gt;
===Using a query===&lt;br /&gt;
Modify the underlying data source of the form or report to perform the calculation for each record and return the result as a (calculated) field.&lt;br /&gt;
&lt;br /&gt;
===Using a macro===&lt;br /&gt;
If you need your control to update as data is entered into a form, you will need to write a small macro to perform the calculation and assign it to an appropriate event on one of the data entry controls (eg. the Text modified event).&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Base Documentation]]&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17885</id>
		<title>MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17885"/>
		<updated>2006-10-02T23:13:21Z</updated>

		<summary type="html">&lt;p&gt;Dale: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Common questions and answers for those migrating from MS Access to OO.o Base.&lt;br /&gt;
&lt;br /&gt;
This is a user community effort - add to the knowledge base if you can.&lt;br /&gt;
&lt;br /&gt;
Please however try to keep the questions and answers general. If there is an answer regarding a feature specifc version of MSA then include the version number also.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Specifically, please only update the wiki if you have an answer for the question you are adding.&amp;#039;&amp;#039;&amp;#039; ( &amp;#039;&amp;#039;If you may need to get back shortly with the answer don&amp;#039;t let that stop you from getting the queston in first however - just come back before long&amp;#039;&amp;#039; ) &lt;br /&gt;
&lt;br /&gt;
For asking &amp;#039;&amp;#039;&amp;#039;specific questions&amp;#039;&amp;#039;&amp;#039; or for general help it would be appropriate to then ask on either the:&lt;br /&gt;
[http://www.oooforum.org/forum/viewforum.phtml?f=10 Base Forum] &lt;br /&gt;
or on  &lt;br /&gt;
[http://dba.openoffice.org/servlets/ProjectMailingListList the Base users mailing list].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can I use Microsoft Access databases (.mdb) in Base? ==&lt;br /&gt;
&lt;br /&gt;
On Windows: yes. You cannot open them directly via &amp;lt;code&amp;gt;File|Open&amp;lt;/code&amp;gt;, but you can access the data therein. For this, you need the [http://msdn.microsoft.com/data/ref/mdac/downloads Microsoft Data Access Components], which are available from Microsoft for free. (In Windows XP, they&amp;#039;re already included, so you need them for older Windows versions only.)&lt;br /&gt;
&lt;br /&gt;
Then, go to &amp;lt;code&amp;gt;File|New|Database&amp;lt;/code&amp;gt;, choose &amp;quot;Connect to an existing datbase&amp;quot;, and select the &amp;quot;Microsoft Access&amp;quot; database type from the list. On the next page, you then select the .mdb file you want to access - that&amp;#039;s it!&lt;br /&gt;
&lt;br /&gt;
This will allow you to read and update the data in your Acess tables.&lt;br /&gt;
&lt;br /&gt;
You cannot read / modify or use the Access forms, queries, or reports.&lt;br /&gt;
&lt;br /&gt;
== Can I read my Base database from MS Access? ==&lt;br /&gt;
There is no way to use the table linking mechanisim in Access to connect to a Base database.&lt;br /&gt;
&lt;br /&gt;
It is possible for a Base database to update data in the Access database. At this time this will require however that the Access database be opened and locked by the Base file.&lt;br /&gt;
&lt;br /&gt;
Data could also be passed back to the Access database by creating a linked CSV file in the Base database. Then linking to this CSV file to a table in the Access database.&lt;br /&gt;
&lt;br /&gt;
== Can I create an Access database (mdb file) with Base? ==&lt;br /&gt;
&lt;br /&gt;
No. Base can not create a new Access database file; or new tables, queries, forms etc. within an existing mdb file.&lt;br /&gt;
&lt;br /&gt;
== Can I create a Switchboard in Base? ==&lt;br /&gt;
&lt;br /&gt;
Base does not currently have a switchboard style form wizard. It is possible to achieve a very similar effect however using either of two techinques.&lt;br /&gt;
&lt;br /&gt;
=== Opening a default form via a macro ===&lt;br /&gt;
&lt;br /&gt;
=== Using a stand alone form to launch the Base database ===&lt;br /&gt;
== Our Access databases uses &amp;quot;Workgroup Security&amp;quot; to control group/user permission to view/maintain data? ==&lt;br /&gt;
&lt;br /&gt;
This question points out what is a fundamental difference between OOoBase and MSAccess . In the case of MSA (MS Access) there is one and only one database engine in use - although you may link tables in MSA to external datasource - MS Jet is still the only database engine actually used by MSA.&lt;br /&gt;
&lt;br /&gt;
In Base (OOoBase) this is not the case at all. The Base database document is simply a front end ( client application ) to a variaty of database engines. In one of these forms it embeddeds a HSQLDB database into the ODB file itself, many people simply see this as the only Base database format. That is totally mistaken. In this instance of an embedded database there is no support for multiple users and of course no support for groups therefore. However, that is only one of the ways Base can be configured.&lt;br /&gt;
&lt;br /&gt;
You are free to use Base as the front end to a HSQLDB database in server mode. HSQLDB is a very small footprint, low administraton database engine and in server mode has full support for users / groups. For larger numbers of users you could just as easily configure Base to work with MySQL, PostgrSQL, Firebird, Oracle or MS SqlServer.&lt;br /&gt;
&lt;br /&gt;
There is another significant difference between MSA and Base regarding this then. In MSA you would deploy one MDB (or one of its variants ) file, then have each user in the workgroup see this file and open it.&lt;br /&gt;
&lt;br /&gt;
In Base each user would have their own ODB file and each of these would be connected to the shared data server. In this way each user would have their own space for custom queries and reports - but it makes distribution of common forms, queries and reports more work.&lt;br /&gt;
&lt;br /&gt;
== Is a Form in Base different from a Form in MSA? ==&lt;br /&gt;
&lt;br /&gt;
Yes&lt;br /&gt;
&lt;br /&gt;
There are very real differnces between how Forms are implemented in Access and Base. &lt;br /&gt;
&lt;br /&gt;
=== Virtual forms within Base forms ===&lt;br /&gt;
&lt;br /&gt;
== Where are the Delete / Upate queries? ==&lt;br /&gt;
Base does not currently support building delete / insert / update queries in the desinger.&lt;br /&gt;
&lt;br /&gt;
=== equivilant actions === &lt;br /&gt;
==== &amp;#039;&amp;#039;using the Query Designer&amp;#039;&amp;#039; ====&lt;br /&gt;
You can achieve the equivilant actions in the GUI using the designer and or SQL commands.&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;using a macro&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
== I want to filter my form based on the contents of a combobox? ==&lt;br /&gt;
&lt;br /&gt;
== Converting my VBA modules to Base modules ==&lt;br /&gt;
&lt;br /&gt;
=== What happened to me? ===&lt;br /&gt;
&lt;br /&gt;
There is no exact duplicate to the ME psuedo variable in VBA. &lt;br /&gt;
&lt;br /&gt;
In Access VBA &amp;#039;me&amp;#039; has attributes of two seperate objects in OOoBasic: &lt;br /&gt;
TextDocument and DataForm&lt;br /&gt;
&lt;br /&gt;
The TextDocument object would be used for controlling the window size and placement on the screen for instance. &lt;br /&gt;
&lt;br /&gt;
The DataForm meanwhile supports result set functions, such as First, Filter, InsertRow.&lt;br /&gt;
&lt;br /&gt;
In OOoBasic the psuedo variable thisComponent normaly would be the TextDocument, while thisComponent.DrawPage.Forms(0) meanwhile would reference the first DataForm owned by the TextDocument.&lt;br /&gt;
&lt;br /&gt;
Perhaps a still closer equivilant is to use the object ownership hierarchy to get to the form. For example if we had a single table form with a button, then in the macro called by the &amp;#039;onClick&amp;#039; or as OOBase calls it the &amp;#039;When initializing&amp;#039; event we would do this: Create a macro in a library named onButtonClick( oEv as object )&lt;br /&gt;
&lt;br /&gt;
    sub onButtonClick( oEv as object )&lt;br /&gt;
      &amp;#039; oEv is the event object passed automatially&lt;br /&gt;
      &amp;#039; it has a property SOURCE which is the &lt;br /&gt;
      &amp;#039; button that initiated this call&lt;br /&gt;
    &lt;br /&gt;
      dim oForm as variant&lt;br /&gt;
    &lt;br /&gt;
      oForm = oEv.Source.Model.Parent&lt;br /&gt;
       &amp;#039; oForm is now the virtual form objct&lt;br /&gt;
      &lt;br /&gt;
      dim oDocument as variant&lt;br /&gt;
      &lt;br /&gt;
      oDocument = thisComponent&lt;br /&gt;
       &amp;#039; oDocument is now the textDocument displayed in&lt;br /&gt;
       &amp;#039; the window on screen&lt;br /&gt;
    &lt;br /&gt;
    end sub&lt;br /&gt;
&lt;br /&gt;
=== Where is findfirst? ===&lt;br /&gt;
&lt;br /&gt;
Base does not appear to have a FindFirst function on the rowset like MS Access, what is the equivilant Base function?&lt;br /&gt;
&lt;br /&gt;
MSAccess VBA example:&lt;br /&gt;
&lt;br /&gt;
Say there is a VB combo box which lists all the prospects in the database and allows the user to select a particular prospect and then have the form automatically go to that person&amp;#039;s data record.&lt;br /&gt;
&lt;br /&gt;
  Private Sub Find_Combo_AfterUpdate()&lt;br /&gt;
  Dim strCriteria As String&lt;br /&gt;
  &lt;br /&gt;
  strCriteria = &amp;quot;[Prospect_ID] =&amp;quot; &amp;amp; Me.Find_Combo&lt;br /&gt;
  &lt;br /&gt;
  Me.recordsetclone.FindFirst (strCriteria)&lt;br /&gt;
  If me.recordsetclone.NoMatch Then&lt;br /&gt;
      MsgBox &amp;quot;No entry found&amp;quot;&lt;br /&gt;
  Else&lt;br /&gt;
      Form_F_Prospects.Bookmark = me.recordsetclone.Bookmark&lt;br /&gt;
  End If&lt;br /&gt;
  &lt;br /&gt;
  End Sub&lt;br /&gt;
&lt;br /&gt;
For this type of simple single column search it is easy enough to create our own find first equivilant with OOoBasic:&lt;br /&gt;
&lt;br /&gt;
 Sub Find_Combo_AfterUpdate( OEv as Object)&lt;br /&gt;
    &amp;#039; Oev is the event object automatically sent&lt;br /&gt;
    &amp;#039; to sub procedure call&lt;br /&gt;
    &amp;#039; Oev will have a property Source&lt;br /&gt;
    &amp;#039; that is the control that triggered&lt;br /&gt;
    &amp;#039; the call to this procedure&lt;br /&gt;
  &lt;br /&gt;
  Dim oForm as variant &amp;#039; The dataform obejct &lt;br /&gt;
  &lt;br /&gt;
  Dim oComboBox as variant &amp;#039; The combobox control&lt;br /&gt;
  &lt;br /&gt;
  Dim oBkMark as variant&lt;br /&gt;
  &lt;br /&gt;
  oForm = oEv.Source.Model.Parent&lt;br /&gt;
  &lt;br /&gt;
  oComboBox = oForm.getByName( &amp;quot;Find_Combo&amp;quot; )&lt;br /&gt;
    &lt;br /&gt;
  oBkMark = FindFirst( oForm.CreateResultSet(), &amp;quot;Prospect_ID&amp;quot;, oComboBox.Text )&lt;br /&gt;
      &amp;#039; oForm.CreateResultSet() is equivilant here to me.recordsetclone&lt;br /&gt;
  if not IsEmpty( oBkMark ) then&lt;br /&gt;
  		oForm.moveToBookmark( oBkMark )&lt;br /&gt;
  else&lt;br /&gt;
  	msgBox( oComboBox.Text &amp;amp; &amp;quot; not found&amp;quot; )&lt;br /&gt;
  end if&lt;br /&gt;
  &lt;br /&gt;
 end sub&lt;br /&gt;
&lt;br /&gt;
 function FindFirst( oRS as variant, ColName as string, SearchVal as string ) as variant&lt;br /&gt;
        &amp;#039; oRS is a resultSet object&lt;br /&gt;
        &amp;#039; ColName is the name of a column in the resultset&lt;br /&gt;
        &amp;#039; SearchVal is&lt;br /&gt;
    dim colIDX as integer&lt;br /&gt;
    dim NotFound as variant&lt;br /&gt;
  &lt;br /&gt;
    FindFirst = notFound&lt;br /&gt;
    colIDX = oRS.FindColumn( ColName )&lt;br /&gt;
        oRS.First&lt;br /&gt;
        do &lt;br /&gt;
          if oRS.getString( colIDX ) &amp;lt;&amp;gt; Searchval&lt;br /&gt;
            oRS.Next&lt;br /&gt;
            if oRS.isAfterLast then&lt;br /&gt;
              exit do&lt;br /&gt;
            endif&lt;br /&gt;
          else&lt;br /&gt;
            FindFirst = oRS.getBookMark&lt;br /&gt;
            exit do&lt;br /&gt;
          end if&lt;br /&gt;
    while oRS.isAfterLast &amp;lt;&amp;gt; True&lt;br /&gt;
  &lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
=== How do I set the filter for a sub-form only? ===&lt;br /&gt;
&lt;br /&gt;
=== Is there an equivilant to DoCmd RunSQL ===&lt;br /&gt;
&lt;br /&gt;
Yes, in OOoBase you would use either a Statement or PreparedStatement object to achieve the same function. With OOoBase you must also decide between using execute and executeUpdate.&lt;br /&gt;
&lt;br /&gt;
For example if you had the VBA line&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;SELECT * FROM tContacts&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
it would become in OOoBase&lt;br /&gt;
  &lt;br /&gt;
  Dim oStatement as variant&lt;br /&gt;
  &lt;br /&gt;
  oStatement = OForm.ActiveConnection.CreateStatement&lt;br /&gt;
    &amp;#039; Where oForm is a DataForm object&lt;br /&gt;
    &amp;#039; NOTE you could do exactly the same thing with&lt;br /&gt;
    &amp;#039; a resultSet or rowSet obejct also&lt;br /&gt;
    &amp;#039; oStatement = OResultSet.ActiveConnection.CreateStatement&lt;br /&gt;
  &lt;br /&gt;
  oStatement.execute( &amp;quot;SELECT * FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot;&amp;quot;  )&lt;br /&gt;
  &lt;br /&gt;
If on the other hand the VBA line where&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;DELETE FROM tContacts WHERE Status = &amp;#039;INACTIVE&amp;#039;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
then we would use the executeUpdate method on a statement&lt;br /&gt;
&lt;br /&gt;
  oStatement.executeUpdate( &amp;quot;DELETE FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot; WHERE &amp;quot;&amp;quot;Status&amp;quot;&amp;quot; = &amp;#039;INACTIVE&amp;#039;&amp;quot;  )&lt;br /&gt;
&lt;br /&gt;
The rule is - &lt;br /&gt;
*if your SQL statement will return records you use execute or executeQuery.&lt;br /&gt;
*if the SQL statement returns no records then you must use executeUpdate.&lt;br /&gt;
&lt;br /&gt;
== If I use Lookup fields/columns in my  Access tables what can I do in Base? ==&lt;br /&gt;
There are two parts to this answer, given that Base does not support Lookup column types in tables.&lt;br /&gt;
&lt;br /&gt;
When a table is displayed in a custom form use of a bound listbox will give you the same functionality. An example of [[adding a listbox to a form]] and to a grid control on a form is at this page.&lt;br /&gt;
&lt;br /&gt;
In a table view ( double clicking on the table name ) there is no equivilant to this.&lt;br /&gt;
&lt;br /&gt;
==How do I use Domain Aggregate functions in Base?==&lt;br /&gt;
&lt;br /&gt;
Domain Aggregate functions such as &amp;#039;&amp;#039;&amp;#039;DCount&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;DLookup&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;DMax&amp;#039;&amp;#039;&amp;#039; etc have no direct equivalent in Base. You will have to write or design queries to return these results using the appropriate SQL functions.&lt;br /&gt;
&lt;br /&gt;
==How do I add Calculated Controls to my forms and reports?==&lt;br /&gt;
&lt;br /&gt;
Controls in Base forms and reports cannot be used to perform calculations. There are two methods available to get a calculated result on a form or report.&lt;br /&gt;
&lt;br /&gt;
===Using a query===&lt;br /&gt;
Modify the underlying data source of the form or report to perform the calculation for each record return the result as a (calculated) field.&lt;br /&gt;
&lt;br /&gt;
===Using a macro===&lt;br /&gt;
If you need your control to update as data is entered into a form, you will need to write a small macro to perform the calculation and assign it to an appropriate event on one of the data entry controls (eg. the Text modified event).&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Base Documentation]]&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17840</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17840"/>
		<updated>2006-10-02T12:08:46Z</updated>

		<summary type="html">&lt;p&gt;Dale: How do I add Calculated Controls to my forms and reports?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I import/convert my Access database to Base ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale&lt;br /&gt;
&lt;br /&gt;
== Lookup Columns ==&lt;br /&gt;
&lt;br /&gt;
Edited to bring it up to it&amp;#039;s own main topic and specifically state that it refers to table design.--[[User:Dale|Dale]] 14:05, 2 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
== How do I use Domain Aggregate functions in Base? ==&lt;br /&gt;
&lt;br /&gt;
Added entry. Pls review for correctness, and clarity. Add any further explanation that seems appropriate.--[[User:Dale|Dale]] 14:07, 2 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
== How do I add Calculated Controls to my forms and reports? ==&lt;br /&gt;
&lt;br /&gt;
Added entry. This is almost a direct copy of DrewJensen&amp;#039;s contributions in oooforum.org. Pls review to make sure I haven&amp;#039;t trashed Drew&amp;#039;s good words.--[[User:Dale|Dale]] 14:08, 2 October 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17839</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17839"/>
		<updated>2006-10-02T12:07:08Z</updated>

		<summary type="html">&lt;p&gt;Dale: How do I use Domain Aggregate functions in Base?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I import/convert my Access database to Base ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale&lt;br /&gt;
&lt;br /&gt;
== Lookup Columns ==&lt;br /&gt;
&lt;br /&gt;
Edited to bring it up to it&amp;#039;s own main topic and specifically state that it refers to table design.--[[User:Dale|Dale]] 14:05, 2 October 2006 (CEST)&lt;br /&gt;
&lt;br /&gt;
== How do I use Domain Aggregate functions in Base? ==&lt;br /&gt;
&lt;br /&gt;
Added entry. Pls review for correctness, and clarity. Add any further explanation that seems appropriate.--[[User:Dale|Dale]] 14:07, 2 October 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17838</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17838"/>
		<updated>2006-10-02T12:05:01Z</updated>

		<summary type="html">&lt;p&gt;Dale: Lookup Columns&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I import/convert my Access database to Base ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale&lt;br /&gt;
&lt;br /&gt;
== Lookup Columns ==&lt;br /&gt;
&lt;br /&gt;
Edited to bring it up to it&amp;#039;s own main topic and specifically state that it refers to table design.--[[User:Dale|Dale]] 14:05, 2 October 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17836</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17836"/>
		<updated>2006-10-02T12:03:00Z</updated>

		<summary type="html">&lt;p&gt;Dale: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I import/convert my Access database to Base ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17835</id>
		<title>MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17835"/>
		<updated>2006-10-02T11:59:08Z</updated>

		<summary type="html">&lt;p&gt;Dale: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Common questions and answers for those migrating from MS Access to OO.o Base.&lt;br /&gt;
&lt;br /&gt;
This is a user community effort - add to the knowledge base if you can.&lt;br /&gt;
&lt;br /&gt;
Please however try to keep the questions and answers general. If there is an answer regarding a feature specifc version of MSA then include the version number also.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Specifically, please only update the wiki if you have an answer for the question you are adding.&amp;#039;&amp;#039;&amp;#039; ( &amp;#039;&amp;#039;If you may need to get back shortly with the answer don&amp;#039;t let that stop you from getting the queston in first however - just come back before long&amp;#039;&amp;#039; ) &lt;br /&gt;
&lt;br /&gt;
For asking &amp;#039;&amp;#039;&amp;#039;specific questions&amp;#039;&amp;#039;&amp;#039; or for general help it would be appropriate to then ask on either the:&lt;br /&gt;
[http://www.oooforum.org/forum/viewforum.phtml?f=10 Base Forum] &lt;br /&gt;
or on  &lt;br /&gt;
[http://dba.openoffice.org/servlets/ProjectMailingListList the Base users mailing list].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can I use Microsoft Access databases (.mdb) in Base? ==&lt;br /&gt;
&lt;br /&gt;
On Windows: yes. You cannot open them directly via &amp;lt;code&amp;gt;File|Open&amp;lt;/code&amp;gt;, but you can access the data therein. For this, you need the [http://msdn.microsoft.com/data/ref/mdac/downloads Microsoft Data Access Components], which are available from Microsoft for free. (In Windows XP, they&amp;#039;re already included, so you need them for older Windows versions only.)&lt;br /&gt;
&lt;br /&gt;
Then, go to &amp;lt;code&amp;gt;File|New|Database&amp;lt;/code&amp;gt;, choose &amp;quot;Connect to an existing datbase&amp;quot;, and select the &amp;quot;Microsoft Access&amp;quot; database type from the list. On the next page, you then select the .mdb file you want to access - that&amp;#039;s it!&lt;br /&gt;
&lt;br /&gt;
This will allow you to read and update the data in your Acess tables.&lt;br /&gt;
&lt;br /&gt;
You cannot read / modify or use the Access forms, queries, or reports.&lt;br /&gt;
&lt;br /&gt;
== Can I read my Base database from MS Access? ==&lt;br /&gt;
There is no way to use the table linking mechanisim in Access to connect to a Base database.&lt;br /&gt;
&lt;br /&gt;
It is possible for a Base database to update data in the Access database. At this time this will require however that the Access database be opened and locked by the Base file.&lt;br /&gt;
&lt;br /&gt;
Data could also be passed back to the Access database by creating a linked CSV file in the Base database. Then linking to this CSV file to a table in the Access database.&lt;br /&gt;
&lt;br /&gt;
== Can I create an Access database (mdb file) with Base? ==&lt;br /&gt;
&lt;br /&gt;
No. Base can not create a new Access database file; or new tables, queries, forms etc. within an existing mdb file.&lt;br /&gt;
&lt;br /&gt;
== Can I create a Switchboard in Base? ==&lt;br /&gt;
&lt;br /&gt;
Base does not currently have a switchboard style form wizard. It is possible to achieve a very similar effect however using either of two techinques.&lt;br /&gt;
&lt;br /&gt;
=== Opening a default form via a macro ===&lt;br /&gt;
&lt;br /&gt;
=== Using a stand alone form to launch the Base database ===&lt;br /&gt;
== Our Access databases uses &amp;quot;Workgroup Security&amp;quot; to control group/user permission to view/maintain data? ==&lt;br /&gt;
&lt;br /&gt;
This question points out what is a fundamental difference between OOoBase and MSAccess . In the case of MSA (MS Access) there is one and only one database engine in use - although you may link tables in MSA to external datasource - MS Jet is still the only database engine actually used by MSA.&lt;br /&gt;
&lt;br /&gt;
In Base (OOoBase) this is not the case at all. The Base database document is simply a front end ( client application ) to a variaty of database engines. In one of these forms it embeddeds a HSQLDB database into the ODB file itself, many people simply see this as the only Base database format. That is totally mistaken. In this instance of an embedded database there is no support for multiple users and of course no support for groups therefore. However, that is only one of the ways Base can be configured.&lt;br /&gt;
&lt;br /&gt;
You are free to use Base as the front end to a HSQLDB database in server mode. HSQLDB is a very small footprint, low administraton database engine and in server mode has full support for users / groups. For larger numbers of users you could just as easily configure Base to work with MySQL, PostgrSQL, Firebird, Oracle or MS SqlServer.&lt;br /&gt;
&lt;br /&gt;
There is another significant difference between MSA and Base regarding this then. In MSA you would deploy one MDB (or one of its variants ) file, then have each user in the workgroup see this file and open it.&lt;br /&gt;
&lt;br /&gt;
In Base each user would have their own ODB file and each of these would be connected to the shared data server. In this way each user would have their own space for custom queries and reports - but it makes distribution of common forms, queries and reports more work.&lt;br /&gt;
&lt;br /&gt;
== Is a Form in Base different from a Form in MSA? ==&lt;br /&gt;
&lt;br /&gt;
Yes&lt;br /&gt;
&lt;br /&gt;
There are very real differnces between how Forms are implemented in Access and Base. &lt;br /&gt;
&lt;br /&gt;
=== Virtual forms within Base forms ===&lt;br /&gt;
&lt;br /&gt;
== Where are the Delete / Upate queries? ==&lt;br /&gt;
Base does not currently support building delete / insert / update queries in the desinger.&lt;br /&gt;
&lt;br /&gt;
=== equivilant actions === &lt;br /&gt;
==== &amp;#039;&amp;#039;using the Query Designer&amp;#039;&amp;#039; ====&lt;br /&gt;
You can achieve the equivilant actions in the GUI using the designer and or SQL commands.&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;using a macro&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
== I want to filter my form based on the contents of a combobox? ==&lt;br /&gt;
&lt;br /&gt;
== Converting my VBA modules to Base modules ==&lt;br /&gt;
&lt;br /&gt;
=== What happened to me? ===&lt;br /&gt;
&lt;br /&gt;
There is no exact duplicate to the ME psuedo variable in VBA. &lt;br /&gt;
&lt;br /&gt;
In Access VBA &amp;#039;me&amp;#039; has attributes of two seperate objects in OOoBasic: &lt;br /&gt;
TextDocument and DataForm&lt;br /&gt;
&lt;br /&gt;
The TextDocument object would be used for controlling the window size and placement on the screen for instance. &lt;br /&gt;
&lt;br /&gt;
The DataForm meanwhile supports result set functions, such as First, Filter, InsertRow.&lt;br /&gt;
&lt;br /&gt;
In OOoBasic the psuedo variable thisComponent normaly would be the TextDocument, while thisComponent.DrawPage.Forms(0) meanwhile would reference the first DataForm owned by the TextDocument.&lt;br /&gt;
&lt;br /&gt;
Perhaps a still closer equivilant is to use the object ownership hierarchy to get to the form. For example if we had a single table form with a button, then in the macro called by the &amp;#039;onClick&amp;#039; or as OOBase calls it the &amp;#039;When initializing&amp;#039; event we would do this: Create a macro in a library named onButtonClick( oEv as object )&lt;br /&gt;
&lt;br /&gt;
    sub onButtonClick( oEv as object )&lt;br /&gt;
      &amp;#039; oEv is the event object passed automatially&lt;br /&gt;
      &amp;#039; it has a property SOURCE which is the &lt;br /&gt;
      &amp;#039; button that initiated this call&lt;br /&gt;
    &lt;br /&gt;
      dim oForm as variant&lt;br /&gt;
    &lt;br /&gt;
      oForm = oEv.Source.Model.Parent&lt;br /&gt;
       &amp;#039; oForm is now the virtual form objct&lt;br /&gt;
      &lt;br /&gt;
      dim oDocument as variant&lt;br /&gt;
      &lt;br /&gt;
      oDocument = thisComponent&lt;br /&gt;
       &amp;#039; oDocument is now the textDocument displayed in&lt;br /&gt;
       &amp;#039; the window on screen&lt;br /&gt;
    &lt;br /&gt;
    end sub&lt;br /&gt;
&lt;br /&gt;
=== Where is findfirst? ===&lt;br /&gt;
&lt;br /&gt;
Base does not appear to have a FindFirst function on the rowset like MS Access, what is the equivilant Base function?&lt;br /&gt;
&lt;br /&gt;
MSAccess VBA example:&lt;br /&gt;
&lt;br /&gt;
Say there is a VB combo box which lists all the prospects in the database and allows the user to select a particular prospect and then have the form automatically go to that person&amp;#039;s data record.&lt;br /&gt;
&lt;br /&gt;
  Private Sub Find_Combo_AfterUpdate()&lt;br /&gt;
  Dim strCriteria As String&lt;br /&gt;
  &lt;br /&gt;
  strCriteria = &amp;quot;[Prospect_ID] =&amp;quot; &amp;amp; Me.Find_Combo&lt;br /&gt;
  &lt;br /&gt;
  Me.recordsetclone.FindFirst (strCriteria)&lt;br /&gt;
  If me.recordsetclone.NoMatch Then&lt;br /&gt;
      MsgBox &amp;quot;No entry found&amp;quot;&lt;br /&gt;
  Else&lt;br /&gt;
      Form_F_Prospects.Bookmark = me.recordsetclone.Bookmark&lt;br /&gt;
  End If&lt;br /&gt;
  &lt;br /&gt;
  End Sub&lt;br /&gt;
&lt;br /&gt;
For this type of simple single column search it is easy enough to create our own find first equivilant with OOoBasic:&lt;br /&gt;
&lt;br /&gt;
 Sub Find_Combo_AfterUpdate( OEv as Object)&lt;br /&gt;
    &amp;#039; Oev is the event object automatically sent&lt;br /&gt;
    &amp;#039; to sub procedure call&lt;br /&gt;
    &amp;#039; Oev will have a property Source&lt;br /&gt;
    &amp;#039; that is the control that triggered&lt;br /&gt;
    &amp;#039; the call to this procedure&lt;br /&gt;
  &lt;br /&gt;
  Dim oForm as variant &amp;#039; The dataform obejct &lt;br /&gt;
  &lt;br /&gt;
  Dim oComboBox as variant &amp;#039; The combobox control&lt;br /&gt;
  &lt;br /&gt;
  Dim oBkMark as variant&lt;br /&gt;
  &lt;br /&gt;
  oForm = oEv.Source.Model.Parent&lt;br /&gt;
  &lt;br /&gt;
  oComboBox = oForm.getByName( &amp;quot;Find_Combo&amp;quot; )&lt;br /&gt;
    &lt;br /&gt;
  oBkMark = FindFirst( oForm.CreateResultSet(), &amp;quot;Prospect_ID&amp;quot;, oComboBox.Text )&lt;br /&gt;
      &amp;#039; oForm.CreateResultSet() is equivilant here to me.recordsetclone&lt;br /&gt;
  if not IsEmpty( oBkMark ) then&lt;br /&gt;
  		oForm.moveToBookmark( oBkMark )&lt;br /&gt;
  else&lt;br /&gt;
  	msgBox( oComboBox.Text &amp;amp; &amp;quot; not found&amp;quot; )&lt;br /&gt;
  end if&lt;br /&gt;
  &lt;br /&gt;
 end sub&lt;br /&gt;
&lt;br /&gt;
 function FindFirst( oRS as variant, ColName as string, SearchVal as string ) as variant&lt;br /&gt;
        &amp;#039; oRS is a resultSet object&lt;br /&gt;
        &amp;#039; ColName is the name of a column in the resultset&lt;br /&gt;
        &amp;#039; SearchVal is&lt;br /&gt;
    dim colIDX as integer&lt;br /&gt;
    dim NotFound as variant&lt;br /&gt;
  &lt;br /&gt;
    FindFirst = notFound&lt;br /&gt;
    colIDX = oRS.FindColumn( ColName )&lt;br /&gt;
        oRS.First&lt;br /&gt;
        do &lt;br /&gt;
          if oRS.getString( colIDX ) &amp;lt;&amp;gt; Searchval&lt;br /&gt;
            oRS.Next&lt;br /&gt;
            if oRS.isAfterLast then&lt;br /&gt;
              exit do&lt;br /&gt;
            endif&lt;br /&gt;
          else&lt;br /&gt;
            FindFirst = oRS.getBookMark&lt;br /&gt;
            exit do&lt;br /&gt;
          end if&lt;br /&gt;
    while oRS.isAfterLast &amp;lt;&amp;gt; True&lt;br /&gt;
  &lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
=== How do I set the filter for a sub-form only? ===&lt;br /&gt;
&lt;br /&gt;
=== Is there an equivilant to DoCmd RunSQL ===&lt;br /&gt;
&lt;br /&gt;
Yes, in OOoBase you would use either a Statement or PreparedStatement object to achieve the same function. With OOoBase you must also decide between using execute and executeUpdate.&lt;br /&gt;
&lt;br /&gt;
For example if you had the VBA line&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;SELECT * FROM tContacts&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
it would become in OOoBase&lt;br /&gt;
  &lt;br /&gt;
  Dim oStatement as variant&lt;br /&gt;
  &lt;br /&gt;
  oStatement = OForm.ActiveConnection.CreateStatement&lt;br /&gt;
    &amp;#039; Where oForm is a DataForm object&lt;br /&gt;
    &amp;#039; NOTE you could do exactly the same thing with&lt;br /&gt;
    &amp;#039; a resultSet or rowSet obejct also&lt;br /&gt;
    &amp;#039; oStatement = OResultSet.ActiveConnection.CreateStatement&lt;br /&gt;
  &lt;br /&gt;
  oStatement.execute( &amp;quot;SELECT * FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot;&amp;quot;  )&lt;br /&gt;
  &lt;br /&gt;
If on the other hand the VBA line where&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;DELETE FROM tContacts WHERE Status = &amp;#039;INACTIVE&amp;#039;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
then we would use the executeUpdate method on a statement&lt;br /&gt;
&lt;br /&gt;
  oStatement.executeUpdate( &amp;quot;DELETE FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot; WHERE &amp;quot;&amp;quot;Status&amp;quot;&amp;quot; = &amp;#039;INACTIVE&amp;#039;&amp;quot;  )&lt;br /&gt;
&lt;br /&gt;
The rule is - &lt;br /&gt;
*if your SQL statement will return records you use execute or executeQuery.&lt;br /&gt;
*if the SQL statement returns no records then you must use executeUpdate.&lt;br /&gt;
&lt;br /&gt;
== If I use Lookup fields/columns in my  Access tables what can I do in Base? ==&lt;br /&gt;
There are two parts to this answer, given that Base does not support Lookup column types in tables.&lt;br /&gt;
&lt;br /&gt;
When a table is displayed in a custom form use of a bound listbox will give you the same functionality. An example of [[adding a listbox to a form]] and to a grid control on a form is at this page.&lt;br /&gt;
&lt;br /&gt;
In a table view ( double clicking on the table name ) there is no equivilant to this.&lt;br /&gt;
&lt;br /&gt;
==How do I use Domain Aggregate functions in Base?==&lt;br /&gt;
&lt;br /&gt;
Domain Aggregate functions such as &amp;#039;&amp;#039;&amp;#039;DCount&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;DLookup&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;DMax&amp;#039;&amp;#039;&amp;#039; etc have no direct equivalent in Base. You will have to write or design queries to return these results using the appropriate SQL functions.&lt;br /&gt;
&lt;br /&gt;
==How do I add Calculated Controls to my forms and reports?==&lt;br /&gt;
&lt;br /&gt;
Controls in Base forms and reports cannot be used to perform calculations. There are two methods available to get a calculated result on a form or report.&lt;br /&gt;
&lt;br /&gt;
Using a query&lt;br /&gt;
Modify the underlying data source of the form or report to perform the calculation for each record return the result as a (calculated) field.&lt;br /&gt;
&lt;br /&gt;
Using a macro&lt;br /&gt;
If you need your control to update as data is entered into a form, you will need to write a small macro to perform the calculation and assign it to an appropriate event on one of the data entry controls (eg. the Text modified event).&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Base Documentation]]&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17834</id>
		<title>MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17834"/>
		<updated>2006-10-02T11:54:49Z</updated>

		<summary type="html">&lt;p&gt;Dale: /* If I use DLookup columns in MS Access what can I do in Base? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Common questions and answers for those migrating from MS Access to OO.o Base.&lt;br /&gt;
&lt;br /&gt;
This is a user community effort - add to the knowledge base if you can.&lt;br /&gt;
&lt;br /&gt;
Please however try to keep the questions and answers general. If there is an answer regarding a feature specifc version of MSA then include the version number also.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Specifically, please only update the wiki if you have an answer for the question you are adding.&amp;#039;&amp;#039;&amp;#039; ( &amp;#039;&amp;#039;If you may need to get back shortly with the answer don&amp;#039;t let that stop you from getting the queston in first however - just come back before long&amp;#039;&amp;#039; ) &lt;br /&gt;
&lt;br /&gt;
For asking &amp;#039;&amp;#039;&amp;#039;specific questions&amp;#039;&amp;#039;&amp;#039; or for general help it would be appropriate to then ask on either the:&lt;br /&gt;
[http://www.oooforum.org/forum/viewforum.phtml?f=10 Base Forum] &lt;br /&gt;
or on  &lt;br /&gt;
[http://dba.openoffice.org/servlets/ProjectMailingListList the Base users mailing list].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can I use Microsoft Access databases (.mdb) in Base? ==&lt;br /&gt;
&lt;br /&gt;
On Windows: yes. You cannot open them directly via &amp;lt;code&amp;gt;File|Open&amp;lt;/code&amp;gt;, but you can access the data therein. For this, you need the [http://msdn.microsoft.com/data/ref/mdac/downloads Microsoft Data Access Components], which are available from Microsoft for free. (In Windows XP, they&amp;#039;re already included, so you need them for older Windows versions only.)&lt;br /&gt;
&lt;br /&gt;
Then, go to &amp;lt;code&amp;gt;File|New|Database&amp;lt;/code&amp;gt;, choose &amp;quot;Connect to an existing datbase&amp;quot;, and select the &amp;quot;Microsoft Access&amp;quot; database type from the list. On the next page, you then select the .mdb file you want to access - that&amp;#039;s it!&lt;br /&gt;
&lt;br /&gt;
This will allow you to read and update the data in your Acess tables.&lt;br /&gt;
&lt;br /&gt;
You cannot read / modify or use the Access forms, queries, or reports.&lt;br /&gt;
&lt;br /&gt;
== Can I read my Base database from MS Access? ==&lt;br /&gt;
There is no way to use the table linking mechanisim in Access to connect to a Base database.&lt;br /&gt;
&lt;br /&gt;
It is possible for a Base database to update data in the Access database. At this time this will require however that the Access database be opened and locked by the Base file.&lt;br /&gt;
&lt;br /&gt;
Data could also be passed back to the Access database by creating a linked CSV file in the Base database. Then linking to this CSV file to a table in the Access database.&lt;br /&gt;
&lt;br /&gt;
== Can I create an Access database (mdb file) with Base? ==&lt;br /&gt;
&lt;br /&gt;
No. Base can not create a new Access database file; or new tables, queries, forms etc. within an existing mdb file.&lt;br /&gt;
&lt;br /&gt;
== Can I create a Switchboard in Base? ==&lt;br /&gt;
&lt;br /&gt;
Base does not currently have a switchboard style form wizard. It is possible to achieve a very similar effect however using either of two techinques.&lt;br /&gt;
&lt;br /&gt;
=== Opening a default form via a macro ===&lt;br /&gt;
&lt;br /&gt;
=== Using a stand alone form to launch the Base database ===&lt;br /&gt;
== Our Access databases uses &amp;quot;Workgroup Security&amp;quot; to control group/user permission to view/maintain data? ==&lt;br /&gt;
&lt;br /&gt;
This question points out what is a fundamental difference between OOoBase and MSAccess . In the case of MSA (MS Access) there is one and only one database engine in use - although you may link tables in MSA to external datasource - MS Jet is still the only database engine actually used by MSA.&lt;br /&gt;
&lt;br /&gt;
In Base (OOoBase) this is not the case at all. The Base database document is simply a front end ( client application ) to a variaty of database engines. In one of these forms it embeddeds a HSQLDB database into the ODB file itself, many people simply see this as the only Base database format. That is totally mistaken. In this instance of an embedded database there is no support for multiple users and of course no support for groups therefore. However, that is only one of the ways Base can be configured.&lt;br /&gt;
&lt;br /&gt;
You are free to use Base as the front end to a HSQLDB database in server mode. HSQLDB is a very small footprint, low administraton database engine and in server mode has full support for users / groups. For larger numbers of users you could just as easily configure Base to work with MySQL, PostgrSQL, Firebird, Oracle or MS SqlServer.&lt;br /&gt;
&lt;br /&gt;
There is another significant difference between MSA and Base regarding this then. In MSA you would deploy one MDB (or one of its variants ) file, then have each user in the workgroup see this file and open it.&lt;br /&gt;
&lt;br /&gt;
In Base each user would have their own ODB file and each of these would be connected to the shared data server. In this way each user would have their own space for custom queries and reports - but it makes distribution of common forms, queries and reports more work.&lt;br /&gt;
&lt;br /&gt;
== Is a Form in Base different from a Form in MSA? ==&lt;br /&gt;
&lt;br /&gt;
Yes&lt;br /&gt;
&lt;br /&gt;
There are very real differnces between how Forms are implemented in Access and Base. &lt;br /&gt;
&lt;br /&gt;
=== Virtual forms within Base forms ===&lt;br /&gt;
&lt;br /&gt;
== Where are the Delete / Upate queries? ==&lt;br /&gt;
Base does not currently support building delete / insert / update queries in the desinger.&lt;br /&gt;
&lt;br /&gt;
=== equivilant actions === &lt;br /&gt;
==== &amp;#039;&amp;#039;using the Query Designer&amp;#039;&amp;#039; ====&lt;br /&gt;
You can achieve the equivilant actions in the GUI using the designer and or SQL commands.&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;using a macro&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
== I want to filter my form based on the contents of a combobox? ==&lt;br /&gt;
&lt;br /&gt;
== Converting my VBA modules to Base modules ==&lt;br /&gt;
&lt;br /&gt;
=== What happened to me? ===&lt;br /&gt;
&lt;br /&gt;
There is no exact duplicate to the ME psuedo variable in VBA. &lt;br /&gt;
&lt;br /&gt;
In Access VBA &amp;#039;me&amp;#039; has attributes of two seperate objects in OOoBasic: &lt;br /&gt;
TextDocument and DataForm&lt;br /&gt;
&lt;br /&gt;
The TextDocument object would be used for controlling the window size and placement on the screen for instance. &lt;br /&gt;
&lt;br /&gt;
The DataForm meanwhile supports result set functions, such as First, Filter, InsertRow.&lt;br /&gt;
&lt;br /&gt;
In OOoBasic the psuedo variable thisComponent normaly would be the TextDocument, while thisComponent.DrawPage.Forms(0) meanwhile would reference the first DataForm owned by the TextDocument.&lt;br /&gt;
&lt;br /&gt;
Perhaps a still closer equivilant is to use the object ownership hierarchy to get to the form. For example if we had a single table form with a button, then in the macro called by the &amp;#039;onClick&amp;#039; or as OOBase calls it the &amp;#039;When initializing&amp;#039; event we would do this: Create a macro in a library named onButtonClick( oEv as object )&lt;br /&gt;
&lt;br /&gt;
    sub onButtonClick( oEv as object )&lt;br /&gt;
      &amp;#039; oEv is the event object passed automatially&lt;br /&gt;
      &amp;#039; it has a property SOURCE which is the &lt;br /&gt;
      &amp;#039; button that initiated this call&lt;br /&gt;
    &lt;br /&gt;
      dim oForm as variant&lt;br /&gt;
    &lt;br /&gt;
      oForm = oEv.Source.Model.Parent&lt;br /&gt;
       &amp;#039; oForm is now the virtual form objct&lt;br /&gt;
      &lt;br /&gt;
      dim oDocument as variant&lt;br /&gt;
      &lt;br /&gt;
      oDocument = thisComponent&lt;br /&gt;
       &amp;#039; oDocument is now the textDocument displayed in&lt;br /&gt;
       &amp;#039; the window on screen&lt;br /&gt;
    &lt;br /&gt;
    end sub&lt;br /&gt;
&lt;br /&gt;
=== Where is findfirst? ===&lt;br /&gt;
&lt;br /&gt;
Base does not appear to have a FindFirst function on the rowset like MS Access, what is the equivilant Base function?&lt;br /&gt;
&lt;br /&gt;
MSAccess VBA example:&lt;br /&gt;
&lt;br /&gt;
Say there is a VB combo box which lists all the prospects in the database and allows the user to select a particular prospect and then have the form automatically go to that person&amp;#039;s data record.&lt;br /&gt;
&lt;br /&gt;
  Private Sub Find_Combo_AfterUpdate()&lt;br /&gt;
  Dim strCriteria As String&lt;br /&gt;
  &lt;br /&gt;
  strCriteria = &amp;quot;[Prospect_ID] =&amp;quot; &amp;amp; Me.Find_Combo&lt;br /&gt;
  &lt;br /&gt;
  Me.recordsetclone.FindFirst (strCriteria)&lt;br /&gt;
  If me.recordsetclone.NoMatch Then&lt;br /&gt;
      MsgBox &amp;quot;No entry found&amp;quot;&lt;br /&gt;
  Else&lt;br /&gt;
      Form_F_Prospects.Bookmark = me.recordsetclone.Bookmark&lt;br /&gt;
  End If&lt;br /&gt;
  &lt;br /&gt;
  End Sub&lt;br /&gt;
&lt;br /&gt;
For this type of simple single column search it is easy enough to create our own find first equivilant with OOoBasic:&lt;br /&gt;
&lt;br /&gt;
 Sub Find_Combo_AfterUpdate( OEv as Object)&lt;br /&gt;
    &amp;#039; Oev is the event object automatically sent&lt;br /&gt;
    &amp;#039; to sub procedure call&lt;br /&gt;
    &amp;#039; Oev will have a property Source&lt;br /&gt;
    &amp;#039; that is the control that triggered&lt;br /&gt;
    &amp;#039; the call to this procedure&lt;br /&gt;
  &lt;br /&gt;
  Dim oForm as variant &amp;#039; The dataform obejct &lt;br /&gt;
  &lt;br /&gt;
  Dim oComboBox as variant &amp;#039; The combobox control&lt;br /&gt;
  &lt;br /&gt;
  Dim oBkMark as variant&lt;br /&gt;
  &lt;br /&gt;
  oForm = oEv.Source.Model.Parent&lt;br /&gt;
  &lt;br /&gt;
  oComboBox = oForm.getByName( &amp;quot;Find_Combo&amp;quot; )&lt;br /&gt;
    &lt;br /&gt;
  oBkMark = FindFirst( oForm.CreateResultSet(), &amp;quot;Prospect_ID&amp;quot;, oComboBox.Text )&lt;br /&gt;
      &amp;#039; oForm.CreateResultSet() is equivilant here to me.recordsetclone&lt;br /&gt;
  if not IsEmpty( oBkMark ) then&lt;br /&gt;
  		oForm.moveToBookmark( oBkMark )&lt;br /&gt;
  else&lt;br /&gt;
  	msgBox( oComboBox.Text &amp;amp; &amp;quot; not found&amp;quot; )&lt;br /&gt;
  end if&lt;br /&gt;
  &lt;br /&gt;
 end sub&lt;br /&gt;
&lt;br /&gt;
 function FindFirst( oRS as variant, ColName as string, SearchVal as string ) as variant&lt;br /&gt;
        &amp;#039; oRS is a resultSet object&lt;br /&gt;
        &amp;#039; ColName is the name of a column in the resultset&lt;br /&gt;
        &amp;#039; SearchVal is&lt;br /&gt;
    dim colIDX as integer&lt;br /&gt;
    dim NotFound as variant&lt;br /&gt;
  &lt;br /&gt;
    FindFirst = notFound&lt;br /&gt;
    colIDX = oRS.FindColumn( ColName )&lt;br /&gt;
        oRS.First&lt;br /&gt;
        do &lt;br /&gt;
          if oRS.getString( colIDX ) &amp;lt;&amp;gt; Searchval&lt;br /&gt;
            oRS.Next&lt;br /&gt;
            if oRS.isAfterLast then&lt;br /&gt;
              exit do&lt;br /&gt;
            endif&lt;br /&gt;
          else&lt;br /&gt;
            FindFirst = oRS.getBookMark&lt;br /&gt;
            exit do&lt;br /&gt;
          end if&lt;br /&gt;
    while oRS.isAfterLast &amp;lt;&amp;gt; True&lt;br /&gt;
  &lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
=== How do I set the filter for a sub-form only? ===&lt;br /&gt;
&lt;br /&gt;
=== Is there an equivilant to DoCmd RunSQL ===&lt;br /&gt;
&lt;br /&gt;
Yes, in OOoBase you would use either a Statement or PreparedStatement object to achieve the same function. With OOoBase you must also decide between using execute and executeUpdate.&lt;br /&gt;
&lt;br /&gt;
For example if you had the VBA line&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;SELECT * FROM tContacts&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
it would become in OOoBase&lt;br /&gt;
  &lt;br /&gt;
  Dim oStatement as variant&lt;br /&gt;
  &lt;br /&gt;
  oStatement = OForm.ActiveConnection.CreateStatement&lt;br /&gt;
    &amp;#039; Where oForm is a DataForm object&lt;br /&gt;
    &amp;#039; NOTE you could do exactly the same thing with&lt;br /&gt;
    &amp;#039; a resultSet or rowSet obejct also&lt;br /&gt;
    &amp;#039; oStatement = OResultSet.ActiveConnection.CreateStatement&lt;br /&gt;
  &lt;br /&gt;
  oStatement.execute( &amp;quot;SELECT * FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot;&amp;quot;  )&lt;br /&gt;
  &lt;br /&gt;
If on the other hand the VBA line where&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;DELETE FROM tContacts WHERE Status = &amp;#039;INACTIVE&amp;#039;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
then we would use the executeUpdate method on a statement&lt;br /&gt;
&lt;br /&gt;
  oStatement.executeUpdate( &amp;quot;DELETE FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot; WHERE &amp;quot;&amp;quot;Status&amp;quot;&amp;quot; = &amp;#039;INACTIVE&amp;#039;&amp;quot;  )&lt;br /&gt;
&lt;br /&gt;
The rule is - &lt;br /&gt;
*if your SQL statement will return records you use execute or executeQuery.&lt;br /&gt;
*if the SQL statement returns no records then you must use executeUpdate.&lt;br /&gt;
&lt;br /&gt;
== If I use Lookup fields/columns in my  Access tables what can I do in Base? ==&lt;br /&gt;
There are two parts to this answer, given that Base does not support Lookup column types in tables.&lt;br /&gt;
&lt;br /&gt;
When a table is displayed in a custom form use of a bound listbox will give you the same functionality. An example of [[adding a listbox to a form]] and to a grid control on a form is at this page.&lt;br /&gt;
&lt;br /&gt;
In a table view ( double clicking on the table name ) there is no equivilant to this.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Base Documentation]]&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17810</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17810"/>
		<updated>2006-10-02T00:43:51Z</updated>

		<summary type="html">&lt;p&gt;Dale: /* Can Base read my Access database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I edited vLookup to Dlookup. AFAIK Access does not have a vLookup function. If vLookup was intended and correct, pls change it back.&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I import/convert my Access database to Base ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17657</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17657"/>
		<updated>2006-09-29T03:10:21Z</updated>

		<summary type="html">&lt;p&gt;Dale: /* Is a Form in Base different from a Form in MSA? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I edited vLookup to Dlookup. AFAIK Access does not have a vLookup function. If vLookup was intended and correct, pls change it back.&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== Can Base read my Access database ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and they no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
Can Base read/write/open my Access database?&lt;br /&gt;
As of version 2.0:&lt;br /&gt;
Tables - yes. Need some instruction (sorry - I&amp;#039;m completely ignorant of how to do this)&lt;br /&gt;
Queries - no (was there something about table views for Access queries?)&lt;br /&gt;
Forms - no.&lt;br /&gt;
Reports - no.&lt;br /&gt;
Macros - no.&lt;br /&gt;
Modules - no.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Later: this is already addressed on the FAQ(Base) page. I suppose the question now is where does it best belong?&lt;br /&gt;
&lt;br /&gt;
quote&lt;br /&gt;
&lt;br /&gt;
Can I use Microsoft Access databases (.mdb) in Base?&lt;br /&gt;
&lt;br /&gt;
On Windows: yes. You cannot open them directly via &amp;lt;code&amp;gt;File|Open&amp;lt;/code&amp;gt;, but you can access the data therein. For this, you need the [http://msdn.microsoft.com/data/ref/mdac/downloads Microsoft Data Access Components], which are available from Microsoft for free. (In Windows XP, they&amp;#039;re already included, so you need them for older Windows versions only.)&lt;br /&gt;
&lt;br /&gt;
Then, go to &amp;lt;code&amp;gt;File|New|Database&amp;lt;/code&amp;gt;, choose &amp;quot;Connect to an existing datbase&amp;quot;, and select the &amp;quot;Microsoft Access&amp;quot; database type from the list. On the next page, you then select the .mdb file you want to access - that&amp;#039;s it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I import/convert my Access database to Base ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17585</id>
		<title>MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17585"/>
		<updated>2006-09-28T01:52:46Z</updated>

		<summary type="html">&lt;p&gt;Dale: /* Can I create an Access database (mdb file) with Base? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Common questions and answers for those migrating from MS Access to OO.o Base.&lt;br /&gt;
&lt;br /&gt;
This is a user community effort - add to the knowledge base if you can.&lt;br /&gt;
&lt;br /&gt;
Please however try to keep the questions and answers general. If there is an answer regarding a feature specifc version of MSA then include the version number also.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Specifically, please only update the wiki if you have an answer for the question you are adding.&amp;#039;&amp;#039;&amp;#039; ( &amp;#039;&amp;#039;If you may need to get back shortly with the answer don&amp;#039;t let that stop you from getting the queston in first however - just come back before long&amp;#039;&amp;#039; ) &lt;br /&gt;
&lt;br /&gt;
For asking &amp;#039;&amp;#039;&amp;#039;specific questions&amp;#039;&amp;#039;&amp;#039; or for general help it would be appropriate to then ask on either the:&lt;br /&gt;
[http://www.oooforum.org/forum/viewforum.phtml?f=10 Base Forum] &lt;br /&gt;
or on  &lt;br /&gt;
[http://dba.openoffice.org/servlets/ProjectMailingListList the Base users mailing list].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can I read my Base database from MS Access? ==&lt;br /&gt;
There is no way to use the table linking mechanisim in Access to connect to a Base database.&lt;br /&gt;
&lt;br /&gt;
It is possible for a Base database to update data in the Access database. At this time this will require however that the Access database be opened and locked by the Base file.&lt;br /&gt;
&lt;br /&gt;
Data could also be passed back to the Access database by creating a linked CSV file in the Base database. Then linking to this CSV file to a table in the Access database.&lt;br /&gt;
&lt;br /&gt;
== Can I create an Access database (mdb file) with Base? ==&lt;br /&gt;
&lt;br /&gt;
No. Base can not create a new Access database file; or new tables, queries, forms etc. within an existing mdb file.&lt;br /&gt;
&lt;br /&gt;
== Can I create a Switchboard in Base? ==&lt;br /&gt;
&lt;br /&gt;
Base does not currently have a switchboard style form wizard. It is possible to achieve a very similar effect however using either of two techinques.&lt;br /&gt;
&lt;br /&gt;
=== Opening a default form via a macro ===&lt;br /&gt;
&lt;br /&gt;
=== Using a stand alone form to launch the Base database ===&lt;br /&gt;
&lt;br /&gt;
== Is a Form in Base different from a Form in MSA? ==&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
There are very real differnces between how Forms are implemented in Access and Base. &lt;br /&gt;
&lt;br /&gt;
=== Virtual forms within Base forms ===&lt;br /&gt;
&lt;br /&gt;
== Where are the Delete / Upate queries? ==&lt;br /&gt;
Base does not currently support building delete / insert / update queries in the desinger.&lt;br /&gt;
&lt;br /&gt;
=== equivilant actions === &lt;br /&gt;
==== &amp;#039;&amp;#039;using the Query Designer&amp;#039;&amp;#039; ====&lt;br /&gt;
You can achieve the equivilant actions in the GUI using the designer and or SQL commands.&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;using a macro&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
== I want to filter my form based on the contents of a combobox? ==&lt;br /&gt;
&lt;br /&gt;
== Converting my VBA modules to Base modules ==&lt;br /&gt;
&lt;br /&gt;
=== What happened to me? ===&lt;br /&gt;
&lt;br /&gt;
There is no exact duplicate to the ME psuedo variable in VBA. &lt;br /&gt;
&lt;br /&gt;
In Access VBA &amp;#039;me&amp;#039; has attributes of two seperate objects in OOoBasic: &lt;br /&gt;
TextDocument and DataForm&lt;br /&gt;
&lt;br /&gt;
The TextDocument object would be used for controlling the window size and placement on the screen for instance. &lt;br /&gt;
&lt;br /&gt;
The DataForm meanwhile supports result set functions, such as First, Filter, InsertRow.&lt;br /&gt;
&lt;br /&gt;
In OOoBasic the psuedo variable thisComponent normaly would be the TextDocument, while thisComponent.DrawPage.Forms(0) meanwhile would reference the first DataForm owned by the TextDocument.&lt;br /&gt;
&lt;br /&gt;
Perhaps a still closer equivilant is to use the object ownership hierarchy to get to the form. For example if we had a single table form with a button, then in the macro called by the &amp;#039;onClick&amp;#039; or as OOBase calls it the &amp;#039;When initializing&amp;#039; event we would do this: Create a macro in a library named onButtonClick( oEv as object )&lt;br /&gt;
&lt;br /&gt;
    sub onButtonClick( oEv as object )&lt;br /&gt;
      &amp;#039; oEv is the event object passed automatially&lt;br /&gt;
      &amp;#039; it has a property SOURCE which is the &lt;br /&gt;
      &amp;#039; button that initiated this call&lt;br /&gt;
    &lt;br /&gt;
      dim oForm as variant&lt;br /&gt;
    &lt;br /&gt;
      oForm = oEv.Source.Model.Parent&lt;br /&gt;
       &amp;#039; oForm is now the virtual form objct&lt;br /&gt;
      &lt;br /&gt;
      dim oDocument as variant&lt;br /&gt;
      &lt;br /&gt;
      oDocument = thisComponent&lt;br /&gt;
       &amp;#039; oDocument is now the textDocument displayed in&lt;br /&gt;
       &amp;#039; the window on screen&lt;br /&gt;
    &lt;br /&gt;
    end sub&lt;br /&gt;
&lt;br /&gt;
=== Where is findfirst? ===&lt;br /&gt;
&lt;br /&gt;
Base does not appear to have a FindFirst function on the rowset like MS Access, what is the equivilant Base function?&lt;br /&gt;
&lt;br /&gt;
MSAccess VBA example:&lt;br /&gt;
&lt;br /&gt;
Say there is a VB combo box which lists all the prospects in the database and allows the user to select a particular prospect and then have the form automatically go to that person&amp;#039;s data record.&lt;br /&gt;
&lt;br /&gt;
  Private Sub Find_Combo_AfterUpdate()&lt;br /&gt;
  Dim strCriteria As String&lt;br /&gt;
  &lt;br /&gt;
  strCriteria = &amp;quot;[Prospect_ID] =&amp;quot; &amp;amp; Me.Find_Combo&lt;br /&gt;
  &lt;br /&gt;
  Me.recordsetclone.FindFirst (strCriteria)&lt;br /&gt;
  If me.recordsetclone.NoMatch Then&lt;br /&gt;
      MsgBox &amp;quot;No entry found&amp;quot;&lt;br /&gt;
  Else&lt;br /&gt;
      Form_F_Prospects.Bookmark = me.recordsetclone.Bookmark&lt;br /&gt;
  End If&lt;br /&gt;
  &lt;br /&gt;
  End Sub&lt;br /&gt;
&lt;br /&gt;
For this type of simple single column search it is easy enough to create our own find first equivilant with OOoBasic:&lt;br /&gt;
&lt;br /&gt;
 Sub Find_Combo_AfterUpdate( OEv as Object)&lt;br /&gt;
    &amp;#039; Oev is the event object automatically sent&lt;br /&gt;
    &amp;#039; to sub procedure call&lt;br /&gt;
    &amp;#039; Oev will have a property Source&lt;br /&gt;
    &amp;#039; that is the control that triggered&lt;br /&gt;
    &amp;#039; the call to this procedure&lt;br /&gt;
  &lt;br /&gt;
  Dim oForm as variant &amp;#039; The dataform obejct &lt;br /&gt;
  &lt;br /&gt;
  Dim oComboBox as variant &amp;#039; The combobox control&lt;br /&gt;
  &lt;br /&gt;
  Dim oBkMark as variant&lt;br /&gt;
  &lt;br /&gt;
  oForm = oEv.Source.Model.Parent&lt;br /&gt;
  &lt;br /&gt;
  oComboBox = oForm.getByName( &amp;quot;Find_Combo&amp;quot; )&lt;br /&gt;
    &lt;br /&gt;
  oBkMark = FindFirst( oForm.CreateResultSet(), &amp;quot;Prospect_ID&amp;quot;, oComboBox.Text )&lt;br /&gt;
      &amp;#039; oForm.CreateResultSet() is equivilant here to me.recordsetclone&lt;br /&gt;
  if not IsEmpty( oBkMark ) then&lt;br /&gt;
  		oForm.moveToBookmark( oBkMark )&lt;br /&gt;
  else&lt;br /&gt;
  	msgBox( oComboBox.Text &amp;amp; &amp;quot; not found&amp;quot; )&lt;br /&gt;
  end if&lt;br /&gt;
  &lt;br /&gt;
 end sub&lt;br /&gt;
&lt;br /&gt;
 function FindFirst( oRS as variant, ColName as string, SearchVal as string ) as variant&lt;br /&gt;
        &amp;#039; oRS is a resultSet object&lt;br /&gt;
        &amp;#039; ColName is the name of a column in the resultset&lt;br /&gt;
        &amp;#039; SearchVal is&lt;br /&gt;
    dim colIDX as integer&lt;br /&gt;
    dim NotFound as variant&lt;br /&gt;
  &lt;br /&gt;
    FindFirst = notFound&lt;br /&gt;
    colIDX = oRS.FindColumn( ColName )&lt;br /&gt;
        oRS.First&lt;br /&gt;
        do &lt;br /&gt;
          if oRS.getString( colIDX ) &amp;lt;&amp;gt; Searchval&lt;br /&gt;
            oRS.Next&lt;br /&gt;
            if oRS.isAfterLast then&lt;br /&gt;
              exit do&lt;br /&gt;
            endif&lt;br /&gt;
          else&lt;br /&gt;
            FindFirst = oRS.getBookMark&lt;br /&gt;
            exit do&lt;br /&gt;
          end if&lt;br /&gt;
    while oRS.isAfterLast &amp;lt;&amp;gt; True&lt;br /&gt;
  &lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
=== How do I set the filter for a sub-form only? ===&lt;br /&gt;
&lt;br /&gt;
=== Is there an equivilant to DoCmd RunSQL ===&lt;br /&gt;
&lt;br /&gt;
Yes, in OOoBase you would use either a Statement or PreparedStatement object to achieve the same function. With OOoBase you must also decide between using execute and executeUpdate.&lt;br /&gt;
&lt;br /&gt;
For example if you had the VBA line&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;SELECT * FROM tContacts&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
it would become in OOoBase&lt;br /&gt;
  &lt;br /&gt;
  Dim oStatement as variant&lt;br /&gt;
  &lt;br /&gt;
  oStatement = OForm.ActiveConnection.CreateStatement&lt;br /&gt;
    &amp;#039; Where oForm is a DataForm object&lt;br /&gt;
    &amp;#039; NOTE you could do exactly the same thing with&lt;br /&gt;
    &amp;#039; a resultSet or rowSet obejct also&lt;br /&gt;
    &amp;#039; oStatement = OResultSet.ActiveConnection.CreateStatement&lt;br /&gt;
  &lt;br /&gt;
  oStatement.execute( &amp;quot;SELECT * FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot;&amp;quot;  )&lt;br /&gt;
  &lt;br /&gt;
If on the other hand the VBA line where&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;DELETE FROM tContacts WHERE Status = &amp;#039;INACTIVE&amp;#039;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
then we would use the executeUpdate method on a statement&lt;br /&gt;
&lt;br /&gt;
  oStatement.executeUpdate( &amp;quot;DELETE FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot; WHERE &amp;quot;&amp;quot;Status&amp;quot;&amp;quot; = &amp;#039;INACTIVE&amp;#039;&amp;quot;  )&lt;br /&gt;
&lt;br /&gt;
The rule is - &lt;br /&gt;
*if your SQL statement will return records you use execute or executeQuery.&lt;br /&gt;
*if the SQL statement returns no records then you must use executeUpdate.&lt;br /&gt;
&lt;br /&gt;
=== If I use DLookup columns in MS Access what can I do in Base? ===&lt;br /&gt;
There are two parts to this answer, given that Base does not support DLookup column types in tables.&lt;br /&gt;
&lt;br /&gt;
When a table is displayed in a custom form use of a bound listbox will give you the same functionality. An example of [[adding a listbox to a form]] and to a grid control on a form is at this page.&lt;br /&gt;
&lt;br /&gt;
In a table view ( double clicking on the table name ) there is no equivilant to this.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Base Documentation]]&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17584</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17584"/>
		<updated>2006-09-28T01:48:57Z</updated>

		<summary type="html">&lt;p&gt;Dale: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I edited vLookup to Dlookup. AFAIK Access does not have a vLookup function. If vLookup was intended and correct, pls change it back.&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== Can Base read my Access database ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and they no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
Can Base read/write/open my Access database?&lt;br /&gt;
As of version 2.0:&lt;br /&gt;
Tables - yes. Need some instruction (sorry - I&amp;#039;m completely ignorant of how to do this)&lt;br /&gt;
Queries - no (was there something about table views for Access queries?)&lt;br /&gt;
Forms - no.&lt;br /&gt;
Reports - no.&lt;br /&gt;
Macros - no.&lt;br /&gt;
Modules - no.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Later: this is already addressed on the FAQ(Base) page. I suppose the question now is where does it best belong?&lt;br /&gt;
&lt;br /&gt;
quote&lt;br /&gt;
&lt;br /&gt;
Can I use Microsoft Access databases (.mdb) in Base?&lt;br /&gt;
&lt;br /&gt;
On Windows: yes. You cannot open them directly via &amp;lt;code&amp;gt;File|Open&amp;lt;/code&amp;gt;, but you can access the data therein. For this, you need the [http://msdn.microsoft.com/data/ref/mdac/downloads Microsoft Data Access Components], which are available from Microsoft for free. (In Windows XP, they&amp;#039;re already included, so you need them for older Windows versions only.)&lt;br /&gt;
&lt;br /&gt;
Then, go to &amp;lt;code&amp;gt;File|New|Database&amp;lt;/code&amp;gt;, choose &amp;quot;Connect to an existing datbase&amp;quot;, and select the &amp;quot;Microsoft Access&amp;quot; database type from the list. On the next page, you then select the .mdb file you want to access - that&amp;#039;s it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How do I import/convert my Access database to Base ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale&lt;br /&gt;
&lt;br /&gt;
== Is a Form in Base different from a Form in MSA? ==&lt;br /&gt;
&lt;br /&gt;
quote&lt;br /&gt;
&lt;br /&gt;
Is a Form in Base different from a Form in MSA? &lt;br /&gt;
No. &lt;br /&gt;
&lt;br /&gt;
There are very real differnces between how Forms are implemented in Access and Base. &lt;br /&gt;
&lt;br /&gt;
/quote&lt;br /&gt;
&lt;br /&gt;
I might be missing something, but shouldn&amp;#039;t this be &amp;quot;Yes. There are ...&amp;quot;&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17583</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17583"/>
		<updated>2006-09-28T01:41:34Z</updated>

		<summary type="html">&lt;p&gt;Dale: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I edited vLookup to Dlookup. AFAIK Access does not have a vLookup function. If vLookup was intended and correct, pls change it back.&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== Can Base read my Access database ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and they no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
Can Base read/write/open my Access database?&lt;br /&gt;
As of version 2.0:&lt;br /&gt;
Tables - yes. Need some instruction (sorry - I&amp;#039;m completely ignorant of how to do this)&lt;br /&gt;
Queries - no (was there something about table views for Access queries?)&lt;br /&gt;
Forms - no.&lt;br /&gt;
Reports - no.&lt;br /&gt;
Macros - no.&lt;br /&gt;
Modules - no.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Later: this is already addressed on the FAQ(Base) page. I suppose the question now is where does it best belong?&lt;br /&gt;
&lt;br /&gt;
quote&lt;br /&gt;
&lt;br /&gt;
=== Can I use Microsoft Access databases (.mdb) in Base? ===&lt;br /&gt;
&lt;br /&gt;
On Windows: yes. You cannot open them directly via &amp;lt;code&amp;gt;File|Open&amp;lt;/code&amp;gt;, but you can access the data therein. For this, you need the [http://msdn.microsoft.com/data/ref/mdac/downloads Microsoft Data Access Components], which are available from Microsoft for free. (In Windows XP, they&amp;#039;re already included, so you need them for older Windows versions only.)&lt;br /&gt;
&lt;br /&gt;
Then, go to &amp;lt;code&amp;gt;File|New|Database&amp;lt;/code&amp;gt;, choose &amp;quot;Connect to an existing datbase&amp;quot;, and select the &amp;quot;Microsoft Access&amp;quot; database type from the list. On the next page, you then select the .mdb file you want to access - that&amp;#039;s it!&lt;br /&gt;
&lt;br /&gt;
== Is a Form in Base different from a Form in MSA? ==&lt;br /&gt;
&lt;br /&gt;
quote&lt;br /&gt;
&lt;br /&gt;
Is a Form in Base different from a Form in MSA? &lt;br /&gt;
No. &lt;br /&gt;
&lt;br /&gt;
There are very real differnces between how Forms are implemented in Access and Base. &lt;br /&gt;
&lt;br /&gt;
/quote&lt;br /&gt;
&lt;br /&gt;
I might be missing something, but shouldn&amp;#039;t this be &amp;quot;Yes. There are ...&amp;quot;&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17582</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17582"/>
		<updated>2006-09-28T01:39:33Z</updated>

		<summary type="html">&lt;p&gt;Dale: Is a Form in Base different from a Form in MSA?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I edited vLookup to Dlookup. AFAIK Access does not have a vLookup function. If vLookup was intended and correct, pls change it back.&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== Can Base read my Access database ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and they no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
Can Base read/write/open my Access database?&lt;br /&gt;
As of version 2.0:&lt;br /&gt;
Tables - yes. Need some instruction (sorry - I&amp;#039;m completely ignorant of how to do this)&lt;br /&gt;
Queries - no (was there something about table views for Access queries?)&lt;br /&gt;
Forms - no.&lt;br /&gt;
Reports - no.&lt;br /&gt;
Macros - no.&lt;br /&gt;
Modules - no.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== How do I import/convert my Access database to Base ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Later: this is already addressed on the FAQ(Base) page. I suppose the question now is where does it best belong?&lt;br /&gt;
&lt;br /&gt;
quote&lt;br /&gt;
&lt;br /&gt;
=== Can I use Microsoft Access databases (.mdb) in Base? ===&lt;br /&gt;
&lt;br /&gt;
On Windows: yes. You cannot open them directly via &amp;lt;code&amp;gt;File|Open&amp;lt;/code&amp;gt;, but you can access the data therein. For this, you need the [http://msdn.microsoft.com/data/ref/mdac/downloads Microsoft Data Access Components], which are available from Microsoft for free. (In Windows XP, they&amp;#039;re already included, so you need them for older Windows versions only.)&lt;br /&gt;
&lt;br /&gt;
Then, go to &amp;lt;code&amp;gt;File|New|Database&amp;lt;/code&amp;gt;, choose &amp;quot;Connect to an existing datbase&amp;quot;, and select the &amp;quot;Microsoft Access&amp;quot; database type from the list. On the next page, you then select the .mdb file you want to access - that&amp;#039;s it!&lt;br /&gt;
&lt;br /&gt;
== Is a Form in Base different from a Form in MSA? ==&lt;br /&gt;
&lt;br /&gt;
quote&lt;br /&gt;
&lt;br /&gt;
Is a Form in Base different from a Form in MSA? &lt;br /&gt;
No. &lt;br /&gt;
&lt;br /&gt;
There are very real differnces between how Forms are implemented in Access and Base. &lt;br /&gt;
&lt;br /&gt;
/quote&lt;br /&gt;
&lt;br /&gt;
I might be missing something, but shouldn&amp;#039;t this be &amp;quot;Yes. There are ...&amp;quot;&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17581</id>
		<title>MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17581"/>
		<updated>2006-09-28T01:36:50Z</updated>

		<summary type="html">&lt;p&gt;Dale: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Common questions and answers for those migrating from MS Access to OO.o Base.&lt;br /&gt;
&lt;br /&gt;
This is a user community effort - add to the knowledge base if you can.&lt;br /&gt;
&lt;br /&gt;
Please however try to keep the questions and answers general. If there is an answer regarding a feature specifc version of MSA then include the version number also.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Specifically, please only update the wiki if you have an answer for the question you are adding.&amp;#039;&amp;#039;&amp;#039; ( &amp;#039;&amp;#039;If you may need to get back shortly with the answer don&amp;#039;t let that stop you from getting the queston in first however - just come back before long&amp;#039;&amp;#039; ) &lt;br /&gt;
&lt;br /&gt;
For asking &amp;#039;&amp;#039;&amp;#039;specific questions&amp;#039;&amp;#039;&amp;#039; or for general help it would be appropriate to then ask on either the:&lt;br /&gt;
[http://www.oooforum.org/forum/viewforum.phtml?f=10 Base Forum] &lt;br /&gt;
or on  &lt;br /&gt;
[http://dba.openoffice.org/servlets/ProjectMailingListList the Base users mailing list].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can I read my Base database from MS Access? ==&lt;br /&gt;
There is no way to use the table linking mechanisim in Access to connect to a Base database.&lt;br /&gt;
&lt;br /&gt;
It is possible for a Base database to update data in the Access database. At this time this will require however that the Access database be opened and locked by the Base file.&lt;br /&gt;
&lt;br /&gt;
Data could also be passed back to the Access database by creating a linked CSV file in the Base database. Then linking to this CSV file to a table in the Access database.&lt;br /&gt;
&lt;br /&gt;
== Can I create an Access database (mdb file) with Base? ==&lt;br /&gt;
&lt;br /&gt;
No. Base can not create a new Access dabase file.&lt;br /&gt;
&lt;br /&gt;
== Can I create a Switchboard in Base? ==&lt;br /&gt;
&lt;br /&gt;
Base does not currently have a switchboard style form wizard. It is possible to achieve a very similar effect however using either of two techinques.&lt;br /&gt;
&lt;br /&gt;
=== Opening a default form via a macro ===&lt;br /&gt;
&lt;br /&gt;
=== Using a stand alone form to launch the Base database ===&lt;br /&gt;
&lt;br /&gt;
== Is a Form in Base different from a Form in MSA? ==&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
There are very real differnces between how Forms are implemented in Access and Base. &lt;br /&gt;
&lt;br /&gt;
=== Virtual forms within Base forms ===&lt;br /&gt;
&lt;br /&gt;
== Where are the Delete / Upate queries? ==&lt;br /&gt;
Base does not currently support building delete / insert / update queries in the desinger.&lt;br /&gt;
&lt;br /&gt;
=== equivilant actions === &lt;br /&gt;
==== &amp;#039;&amp;#039;using the Query Designer&amp;#039;&amp;#039; ====&lt;br /&gt;
You can achieve the equivilant actions in the GUI using the designer and or SQL commands.&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;using a macro&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
== I want to filter my form based on the contents of a combobox? ==&lt;br /&gt;
&lt;br /&gt;
== Converting my VBA modules to Base modules ==&lt;br /&gt;
&lt;br /&gt;
=== What happened to me? ===&lt;br /&gt;
&lt;br /&gt;
There is no exact duplicate to the ME psuedo variable in VBA. &lt;br /&gt;
&lt;br /&gt;
In Access VBA &amp;#039;me&amp;#039; has attributes of two seperate objects in OOoBasic: &lt;br /&gt;
TextDocument and DataForm&lt;br /&gt;
&lt;br /&gt;
The TextDocument object would be used for controlling the window size and placement on the screen for instance. &lt;br /&gt;
&lt;br /&gt;
The DataForm meanwhile supports result set functions, such as First, Filter, InsertRow.&lt;br /&gt;
&lt;br /&gt;
In OOoBasic the psuedo variable thisComponent normaly would be the TextDocument, while thisComponent.DrawPage.Forms(0) meanwhile would reference the first DataForm owned by the TextDocument.&lt;br /&gt;
&lt;br /&gt;
Perhaps a still closer equivilant is to use the object ownership hierarchy to get to the form. For example if we had a single table form with a button, then in the macro called by the &amp;#039;onClick&amp;#039; or as OOBase calls it the &amp;#039;When initializing&amp;#039; event we would do this: Create a macro in a library named onButtonClick( oEv as object )&lt;br /&gt;
&lt;br /&gt;
    sub onButtonClick( oEv as object )&lt;br /&gt;
      &amp;#039; oEv is the event object passed automatially&lt;br /&gt;
      &amp;#039; it has a property SOURCE which is the &lt;br /&gt;
      &amp;#039; button that initiated this call&lt;br /&gt;
    &lt;br /&gt;
      dim oForm as variant&lt;br /&gt;
    &lt;br /&gt;
      oForm = oEv.Source.Model.Parent&lt;br /&gt;
       &amp;#039; oForm is now the virtual form objct&lt;br /&gt;
      &lt;br /&gt;
      dim oDocument as variant&lt;br /&gt;
      &lt;br /&gt;
      oDocument = thisComponent&lt;br /&gt;
       &amp;#039; oDocument is now the textDocument displayed in&lt;br /&gt;
       &amp;#039; the window on screen&lt;br /&gt;
    &lt;br /&gt;
    end sub&lt;br /&gt;
&lt;br /&gt;
=== Where is findfirst? ===&lt;br /&gt;
&lt;br /&gt;
Base does not appear to have a FindFirst function on the rowset like MS Access, what is the equivilant Base function?&lt;br /&gt;
&lt;br /&gt;
MSAccess VBA example:&lt;br /&gt;
&lt;br /&gt;
Say there is a VB combo box which lists all the prospects in the database and allows the user to select a particular prospect and then have the form automatically go to that person&amp;#039;s data record.&lt;br /&gt;
&lt;br /&gt;
  Private Sub Find_Combo_AfterUpdate()&lt;br /&gt;
  Dim strCriteria As String&lt;br /&gt;
  &lt;br /&gt;
  strCriteria = &amp;quot;[Prospect_ID] =&amp;quot; &amp;amp; Me.Find_Combo&lt;br /&gt;
  &lt;br /&gt;
  Me.recordsetclone.FindFirst (strCriteria)&lt;br /&gt;
  If me.recordsetclone.NoMatch Then&lt;br /&gt;
      MsgBox &amp;quot;No entry found&amp;quot;&lt;br /&gt;
  Else&lt;br /&gt;
      Form_F_Prospects.Bookmark = me.recordsetclone.Bookmark&lt;br /&gt;
  End If&lt;br /&gt;
  &lt;br /&gt;
  End Sub&lt;br /&gt;
&lt;br /&gt;
For this type of simple single column search it is easy enough to create our own find first equivilant with OOoBasic:&lt;br /&gt;
&lt;br /&gt;
 Sub Find_Combo_AfterUpdate( OEv as Object)&lt;br /&gt;
    &amp;#039; Oev is the event object automatically sent&lt;br /&gt;
    &amp;#039; to sub procedure call&lt;br /&gt;
    &amp;#039; Oev will have a property Source&lt;br /&gt;
    &amp;#039; that is the control that triggered&lt;br /&gt;
    &amp;#039; the call to this procedure&lt;br /&gt;
  &lt;br /&gt;
  Dim oForm as variant &amp;#039; The dataform obejct &lt;br /&gt;
  &lt;br /&gt;
  Dim oComboBox as variant &amp;#039; The combobox control&lt;br /&gt;
  &lt;br /&gt;
  Dim oBkMark as variant&lt;br /&gt;
  &lt;br /&gt;
  oForm = oEv.Source.Model.Parent&lt;br /&gt;
  &lt;br /&gt;
  oComboBox = oForm.getByName( &amp;quot;Find_Combo&amp;quot; )&lt;br /&gt;
    &lt;br /&gt;
  oBkMark = FindFirst( oForm.CreateResultSet(), &amp;quot;Prospect_ID&amp;quot;, oComboBox.Text )&lt;br /&gt;
      &amp;#039; oForm.CreateResultSet() is equivilant here to me.recordsetclone&lt;br /&gt;
  if not IsEmpty( oBkMark ) then&lt;br /&gt;
  		oForm.moveToBookmark( oBkMark )&lt;br /&gt;
  else&lt;br /&gt;
  	msgBox( oComboBox.Text &amp;amp; &amp;quot; not found&amp;quot; )&lt;br /&gt;
  end if&lt;br /&gt;
  &lt;br /&gt;
 end sub&lt;br /&gt;
&lt;br /&gt;
 function FindFirst( oRS as variant, ColName as string, SearchVal as string ) as variant&lt;br /&gt;
        &amp;#039; oRS is a resultSet object&lt;br /&gt;
        &amp;#039; ColName is the name of a column in the resultset&lt;br /&gt;
        &amp;#039; SearchVal is&lt;br /&gt;
    dim colIDX as integer&lt;br /&gt;
    dim NotFound as variant&lt;br /&gt;
  &lt;br /&gt;
    FindFirst = notFound&lt;br /&gt;
    colIDX = oRS.FindColumn( ColName )&lt;br /&gt;
        oRS.First&lt;br /&gt;
        do &lt;br /&gt;
          if oRS.getString( colIDX ) &amp;lt;&amp;gt; Searchval&lt;br /&gt;
            oRS.Next&lt;br /&gt;
            if oRS.isAfterLast then&lt;br /&gt;
              exit do&lt;br /&gt;
            endif&lt;br /&gt;
          else&lt;br /&gt;
            FindFirst = oRS.getBookMark&lt;br /&gt;
            exit do&lt;br /&gt;
          end if&lt;br /&gt;
    while oRS.isAfterLast &amp;lt;&amp;gt; True&lt;br /&gt;
  &lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
=== How do I set the filter for a sub-form only? ===&lt;br /&gt;
&lt;br /&gt;
=== Is there an equivilant to DoCmd RunSQL ===&lt;br /&gt;
&lt;br /&gt;
Yes, in OOoBase you would use either a Statement or PreparedStatement object to achieve the same function. With OOoBase you must also decide between using execute and executeUpdate.&lt;br /&gt;
&lt;br /&gt;
For example if you had the VBA line&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;SELECT * FROM tContacts&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
it would become in OOoBase&lt;br /&gt;
  &lt;br /&gt;
  Dim oStatement as variant&lt;br /&gt;
  &lt;br /&gt;
  oStatement = OForm.ActiveConnection.CreateStatement&lt;br /&gt;
    &amp;#039; Where oForm is a DataForm object&lt;br /&gt;
    &amp;#039; NOTE you could do exactly the same thing with&lt;br /&gt;
    &amp;#039; a resultSet or rowSet obejct also&lt;br /&gt;
    &amp;#039; oStatement = OResultSet.ActiveConnection.CreateStatement&lt;br /&gt;
  &lt;br /&gt;
  oStatement.execute( &amp;quot;SELECT * FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot;&amp;quot;  )&lt;br /&gt;
  &lt;br /&gt;
If on the other hand the VBA line where&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;DELETE FROM tContacts WHERE Status = &amp;#039;INACTIVE&amp;#039;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
then we would use the executeUpdate method on a statement&lt;br /&gt;
&lt;br /&gt;
  oStatement.executeUpdate( &amp;quot;DELETE FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot; WHERE &amp;quot;&amp;quot;Status&amp;quot;&amp;quot; = &amp;#039;INACTIVE&amp;#039;&amp;quot;  )&lt;br /&gt;
&lt;br /&gt;
The rule is - &lt;br /&gt;
*if your SQL statement will return records you use execute or executeQuery.&lt;br /&gt;
*if the SQL statement returns no records then you must use executeUpdate.&lt;br /&gt;
&lt;br /&gt;
=== If I use DLookup columns in MS Access what can I do in Base? ===&lt;br /&gt;
There are two parts to this answer, given that Base does not support DLookup column types in tables.&lt;br /&gt;
&lt;br /&gt;
When a table is displayed in a custom form use of a bound listbox will give you the same functionality. An example of [[adding a listbox to a form]] and to a grid control on a form is at this page.&lt;br /&gt;
&lt;br /&gt;
In a table view ( double clicking on the table name ) there is no equivilant to this.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Base Documentation]]&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17580</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17580"/>
		<updated>2006-09-28T01:31:39Z</updated>

		<summary type="html">&lt;p&gt;Dale: /* How do I import/convert my Access database to Base */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I edited vLookup to Dlookup. AFAIK Access does not have a vLookup function. If vLookup was intended and correct, pls change it back.&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== Can Base read my Access database ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and they no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
Can Base read/write/open my Access database?&lt;br /&gt;
As of version 2.0:&lt;br /&gt;
Tables - yes. Need some instruction (sorry - I&amp;#039;m completely ignorant of how to do this)&lt;br /&gt;
Queries - no (was there something about table views for Access queries?)&lt;br /&gt;
Forms - no.&lt;br /&gt;
Reports - no.&lt;br /&gt;
Macros - no.&lt;br /&gt;
Modules - no.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== How do I import/convert my Access database to Base ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Later: this is already addressed on the FAQ(Base) page. I suppose the question now is where does it best belong?&lt;br /&gt;
&lt;br /&gt;
quote&lt;br /&gt;
&lt;br /&gt;
=== Can I use Microsoft Access databases (.mdb) in Base? ===&lt;br /&gt;
&lt;br /&gt;
On Windows: yes. You cannot open them directly via &amp;lt;code&amp;gt;File|Open&amp;lt;/code&amp;gt;, but you can access the data therein. For this, you need the [http://msdn.microsoft.com/data/ref/mdac/downloads Microsoft Data Access Components], which are available from Microsoft for free. (In Windows XP, they&amp;#039;re already included, so you need them for older Windows versions only.)&lt;br /&gt;
&lt;br /&gt;
Then, go to &amp;lt;code&amp;gt;File|New|Database&amp;lt;/code&amp;gt;, choose &amp;quot;Connect to an existing datbase&amp;quot;, and select the &amp;quot;Microsoft Access&amp;quot; database type from the list. On the next page, you then select the .mdb file you want to access - that&amp;#039;s it!&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17579</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17579"/>
		<updated>2006-09-28T00:33:09Z</updated>

		<summary type="html">&lt;p&gt;Dale: /* How do I import/convert my Access database to Base */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I edited vLookup to Dlookup. AFAIK Access does not have a vLookup function. If vLookup was intended and correct, pls change it back.&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== Can Base read my Access database ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and they no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
Can Base read/write/open my Access database?&lt;br /&gt;
As of version 2.0:&lt;br /&gt;
Tables - yes. Need some instruction (sorry - I&amp;#039;m completely ignorant of how to do this)&lt;br /&gt;
Queries - no (was there something about table views for Access queries?)&lt;br /&gt;
Forms - no.&lt;br /&gt;
Reports - no.&lt;br /&gt;
Macros - no.&lt;br /&gt;
Modules - no.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== How do I import/convert my Access database to Base ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17578</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17578"/>
		<updated>2006-09-28T00:32:16Z</updated>

		<summary type="html">&lt;p&gt;Dale: How do I import/convert my Access database to Base&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I edited vLookup to Dlookup. AFAIK Access does not have a vLookup function. If vLookup was intended and correct, pls change it back.&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== Can Base read my Access database ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and they no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
Can Base read/write/open my Access database?&lt;br /&gt;
As of version 2.0:&lt;br /&gt;
Tables - yes. Need some instruction (sorry - I&amp;#039;m completely ignorant of how to do this)&lt;br /&gt;
Queries - no (was there something about table views for Access queries?)&lt;br /&gt;
Forms - no.&lt;br /&gt;
Reports - no.&lt;br /&gt;
Macros - no.&lt;br /&gt;
Modules - no.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== How do I import/convert my Access database to Base ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
How do I import/convert my Access database to Base?&lt;br /&gt;
&lt;br /&gt;
As of ver 2.0 there is no direct method for this. Tables can be read from the mdb or converted to a more Base-friendly format (native Base tables, Calc spreadsheet, csv). &amp;lt;&amp;lt;Probably need some indication of method here. Or maybe reference to a separate (yet to be written) HowTo&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forms and reports cannot be imported and have to be re created from scratch.&lt;br /&gt;
&lt;br /&gt;
There is no direct equivalent to Access macros. These have to be re created from scratch in a language supported by OOo (StarBasic, ...)&lt;br /&gt;
&lt;br /&gt;
Code modules:&lt;br /&gt;
OOo and Base do not support VBA. The code used in you Access database will have to be rewritten in a language supported by OOo.&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17577</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17577"/>
		<updated>2006-09-28T00:18:36Z</updated>

		<summary type="html">&lt;p&gt;Dale: Can Base read my Access database&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I edited vLookup to Dlookup. AFAIK Access does not have a vLookup function. If vLookup was intended and correct, pls change it back.&lt;br /&gt;
Dale.&lt;br /&gt;
&lt;br /&gt;
== Can Base read my Access database ==&lt;br /&gt;
&lt;br /&gt;
We seem to be missing a couple of obvious FAQs. Probably because the page has just started and they no one has got around to them yet.&lt;br /&gt;
&lt;br /&gt;
Can Base read/write/open my Access database?&lt;br /&gt;
As of version 2.0:&lt;br /&gt;
Tables - yes. Need some instruction (sorry - I&amp;#039;m completely ignorant of how to do this)&lt;br /&gt;
Queries - no (was there something about table views for Access queries?)&lt;br /&gt;
Forms - no.&lt;br /&gt;
Reports - no.&lt;br /&gt;
Macros - no.&lt;br /&gt;
Modules - no.&lt;br /&gt;
&lt;br /&gt;
+ + + + +&lt;br /&gt;
Dale.&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17576</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17576"/>
		<updated>2006-09-27T23:35:25Z</updated>

		<summary type="html">&lt;p&gt;Dale: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I edited vLookup to Dlookup. AFAIK Access does not have a vLookup function. If vLookup was intended and correct, pls change it back.&lt;br /&gt;
Dale.&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17575</id>
		<title>Talk:MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:MSA-Base_Faq&amp;diff=17575"/>
		<updated>2006-09-27T23:34:59Z</updated>

		<summary type="html">&lt;p&gt;Dale: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I edited vLookup to Dlookup. AFAIK Access does not have a vLookup function. If vLookup was intended and correct, pls change it back.&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17574</id>
		<title>MSA-Base Faq</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=MSA-Base_Faq&amp;diff=17574"/>
		<updated>2006-09-27T23:33:06Z</updated>

		<summary type="html">&lt;p&gt;Dale: /* If I use DLookup columns in MS Access what can I do in Base? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Common questions and answers for those migrating from MS Access to OO.o Base.&lt;br /&gt;
&lt;br /&gt;
This is a user community effort - add to the knowledge base if you can.&lt;br /&gt;
&lt;br /&gt;
Please however try to keep the questions and answers general. If there is an answer regarding a feature specifc version of MSA then include the version number also.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Specifically, please only update the wiki if you have an answer for the question you are adding.&amp;#039;&amp;#039;&amp;#039; ( &amp;#039;&amp;#039;If you may need to get back shortly with the answer don&amp;#039;t let that stop you from getting the queston in first however - just come back before long&amp;#039;&amp;#039; ) &lt;br /&gt;
&lt;br /&gt;
For asking &amp;#039;&amp;#039;&amp;#039;specific questions&amp;#039;&amp;#039;&amp;#039; or for general help it would be appropriate to then ask on either the:&lt;br /&gt;
[http://www.oooforum.org/forum/viewforum.phtml?f=10 Base Forum] &lt;br /&gt;
or on  &lt;br /&gt;
[http://dba.openoffice.org/servlets/ProjectMailingListList the Base users mailing list].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can I read my Base database from MS Access? ==&lt;br /&gt;
There is no way to use the table linking mechanisim in Access to connect to a Base database.&lt;br /&gt;
&lt;br /&gt;
It is possible for a Base database to update data in the Access database. At this time this will require however that the Access database be opened and locked by the Base file.&lt;br /&gt;
&lt;br /&gt;
Data could also be passed back to the Access database by creating a linked CSV file in the Base database. Then linking to this CSV file to a table in the Access database.&lt;br /&gt;
&lt;br /&gt;
== Can I create a Switchboard in Base? ==&lt;br /&gt;
&lt;br /&gt;
Base does not currently have a switchboard style form wizard. It is possible to achieve a very similar effect however using either of two techinques.&lt;br /&gt;
&lt;br /&gt;
=== Opening a default form via a macro ===&lt;br /&gt;
&lt;br /&gt;
=== Using a stand alone form to launch the Base database ===&lt;br /&gt;
&lt;br /&gt;
== Is a Form in Base different from a Form in MSA? ==&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
There are very real differnces between how Forms are implemented in Access and Base. &lt;br /&gt;
&lt;br /&gt;
=== Virtual forms within Base forms ===&lt;br /&gt;
&lt;br /&gt;
== Where are the Delete / Upate queries? ==&lt;br /&gt;
Base does not currently support building delete / insert / update queries in the desinger.&lt;br /&gt;
&lt;br /&gt;
=== equivilant actions === &lt;br /&gt;
==== &amp;#039;&amp;#039;using the Query Designer&amp;#039;&amp;#039; ====&lt;br /&gt;
You can achieve the equivilant actions in the GUI using the designer and or SQL commands.&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;using a macro&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
== I want to filter my form based on the contents of a combobox? ==&lt;br /&gt;
&lt;br /&gt;
== Converting my VBA modules to Base modules ==&lt;br /&gt;
&lt;br /&gt;
=== What happened to me? ===&lt;br /&gt;
&lt;br /&gt;
There is no exact duplicate to the ME psuedo variable in VBA. &lt;br /&gt;
&lt;br /&gt;
In Access VBA &amp;#039;me&amp;#039; has attributes of two seperate objects in OOoBasic: &lt;br /&gt;
TextDocument and DataForm&lt;br /&gt;
&lt;br /&gt;
The TextDocument object would be used for controlling the window size and placement on the screen for instance. &lt;br /&gt;
&lt;br /&gt;
The DataForm meanwhile supports result set functions, such as First, Filter, InsertRow.&lt;br /&gt;
&lt;br /&gt;
In OOoBasic the psuedo variable thisComponent normaly would be the TextDocument, while thisComponent.DrawPage.Forms(0) meanwhile would reference the first DataForm owned by the TextDocument.&lt;br /&gt;
&lt;br /&gt;
Perhaps a still closer equivilant is to use the object ownership hierarchy to get to the form. For example if we had a single table form with a button, then in the macro called by the &amp;#039;onClick&amp;#039; or as OOBase calls it the &amp;#039;When initializing&amp;#039; event we would do this: Create a macro in a library named onButtonClick( oEv as object )&lt;br /&gt;
&lt;br /&gt;
    sub onButtonClick( oEv as object )&lt;br /&gt;
      &amp;#039; oEv is the event object passed automatially&lt;br /&gt;
      &amp;#039; it has a property SOURCE which is the &lt;br /&gt;
      &amp;#039; button that initiated this call&lt;br /&gt;
    &lt;br /&gt;
      dim oForm as variant&lt;br /&gt;
    &lt;br /&gt;
      oForm = oEv.Source.Model.Parent&lt;br /&gt;
       &amp;#039; oForm is now the virtual form objct&lt;br /&gt;
      &lt;br /&gt;
      dim oDocument as variant&lt;br /&gt;
      &lt;br /&gt;
      oDocument = thisComponent&lt;br /&gt;
       &amp;#039; oDocument is now the textDocument displayed in&lt;br /&gt;
       &amp;#039; the window on screen&lt;br /&gt;
    &lt;br /&gt;
    end sub&lt;br /&gt;
&lt;br /&gt;
=== Where is findfirst? ===&lt;br /&gt;
&lt;br /&gt;
Base does not appear to have a FindFirst function on the rowset like MS Access, what is the equivilant Base function?&lt;br /&gt;
&lt;br /&gt;
MSAccess VBA example:&lt;br /&gt;
&lt;br /&gt;
Say there is a VB combo box which lists all the prospects in the database and allows the user to select a particular prospect and then have the form automatically go to that person&amp;#039;s data record.&lt;br /&gt;
&lt;br /&gt;
  Private Sub Find_Combo_AfterUpdate()&lt;br /&gt;
  Dim strCriteria As String&lt;br /&gt;
  &lt;br /&gt;
  strCriteria = &amp;quot;[Prospect_ID] =&amp;quot; &amp;amp; Me.Find_Combo&lt;br /&gt;
  &lt;br /&gt;
  Me.recordsetclone.FindFirst (strCriteria)&lt;br /&gt;
  If me.recordsetclone.NoMatch Then&lt;br /&gt;
      MsgBox &amp;quot;No entry found&amp;quot;&lt;br /&gt;
  Else&lt;br /&gt;
      Form_F_Prospects.Bookmark = me.recordsetclone.Bookmark&lt;br /&gt;
  End If&lt;br /&gt;
  &lt;br /&gt;
  End Sub&lt;br /&gt;
&lt;br /&gt;
For this type of simple single column search it is easy enough to create our own find first equivilant with OOoBasic:&lt;br /&gt;
&lt;br /&gt;
 Sub Find_Combo_AfterUpdate( OEv as Object)&lt;br /&gt;
    &amp;#039; Oev is the event object automatically sent&lt;br /&gt;
    &amp;#039; to sub procedure call&lt;br /&gt;
    &amp;#039; Oev will have a property Source&lt;br /&gt;
    &amp;#039; that is the control that triggered&lt;br /&gt;
    &amp;#039; the call to this procedure&lt;br /&gt;
  &lt;br /&gt;
  Dim oForm as variant &amp;#039; The dataform obejct &lt;br /&gt;
  &lt;br /&gt;
  Dim oComboBox as variant &amp;#039; The combobox control&lt;br /&gt;
  &lt;br /&gt;
  Dim oBkMark as variant&lt;br /&gt;
  &lt;br /&gt;
  oForm = oEv.Source.Model.Parent&lt;br /&gt;
  &lt;br /&gt;
  oComboBox = oForm.getByName( &amp;quot;Find_Combo&amp;quot; )&lt;br /&gt;
    &lt;br /&gt;
  oBkMark = FindFirst( oForm.CreateResultSet(), &amp;quot;Prospect_ID&amp;quot;, oComboBox.Text )&lt;br /&gt;
      &amp;#039; oForm.CreateResultSet() is equivilant here to me.recordsetclone&lt;br /&gt;
  if not IsEmpty( oBkMark ) then&lt;br /&gt;
  		oForm.moveToBookmark( oBkMark )&lt;br /&gt;
  else&lt;br /&gt;
  	msgBox( oComboBox.Text &amp;amp; &amp;quot; not found&amp;quot; )&lt;br /&gt;
  end if&lt;br /&gt;
  &lt;br /&gt;
 end sub&lt;br /&gt;
&lt;br /&gt;
 function FindFirst( oRS as variant, ColName as string, SearchVal as string ) as variant&lt;br /&gt;
        &amp;#039; oRS is a resultSet object&lt;br /&gt;
        &amp;#039; ColName is the name of a column in the resultset&lt;br /&gt;
        &amp;#039; SearchVal is&lt;br /&gt;
    dim colIDX as integer&lt;br /&gt;
    dim NotFound as variant&lt;br /&gt;
  &lt;br /&gt;
    FindFirst = notFound&lt;br /&gt;
    colIDX = oRS.FindColumn( ColName )&lt;br /&gt;
        oRS.First&lt;br /&gt;
        do &lt;br /&gt;
          if oRS.getString( colIDX ) &amp;lt;&amp;gt; Searchval&lt;br /&gt;
            oRS.Next&lt;br /&gt;
            if oRS.isAfterLast then&lt;br /&gt;
              exit do&lt;br /&gt;
            endif&lt;br /&gt;
          else&lt;br /&gt;
            FindFirst = oRS.getBookMark&lt;br /&gt;
            exit do&lt;br /&gt;
          end if&lt;br /&gt;
    while oRS.isAfterLast &amp;lt;&amp;gt; True&lt;br /&gt;
  &lt;br /&gt;
 end function&lt;br /&gt;
&lt;br /&gt;
=== How do I set the filter for a sub-form only? ===&lt;br /&gt;
&lt;br /&gt;
=== Is there an equivilant to DoCmd RunSQL ===&lt;br /&gt;
&lt;br /&gt;
Yes, in OOoBase you would use either a Statement or PreparedStatement object to achieve the same function. With OOoBase you must also decide between using execute and executeUpdate.&lt;br /&gt;
&lt;br /&gt;
For example if you had the VBA line&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;SELECT * FROM tContacts&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
it would become in OOoBase&lt;br /&gt;
  &lt;br /&gt;
  Dim oStatement as variant&lt;br /&gt;
  &lt;br /&gt;
  oStatement = OForm.ActiveConnection.CreateStatement&lt;br /&gt;
    &amp;#039; Where oForm is a DataForm object&lt;br /&gt;
    &amp;#039; NOTE you could do exactly the same thing with&lt;br /&gt;
    &amp;#039; a resultSet or rowSet obejct also&lt;br /&gt;
    &amp;#039; oStatement = OResultSet.ActiveConnection.CreateStatement&lt;br /&gt;
  &lt;br /&gt;
  oStatement.execute( &amp;quot;SELECT * FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot;&amp;quot;  )&lt;br /&gt;
  &lt;br /&gt;
If on the other hand the VBA line where&lt;br /&gt;
  DoCmd RunSQL( &amp;quot;DELETE FROM tContacts WHERE Status = &amp;#039;INACTIVE&amp;#039;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
then we would use the executeUpdate method on a statement&lt;br /&gt;
&lt;br /&gt;
  oStatement.executeUpdate( &amp;quot;DELETE FROM &amp;quot;&amp;quot;tContacts&amp;quot;&amp;quot; WHERE &amp;quot;&amp;quot;Status&amp;quot;&amp;quot; = &amp;#039;INACTIVE&amp;#039;&amp;quot;  )&lt;br /&gt;
&lt;br /&gt;
The rule is - &lt;br /&gt;
*if your SQL statement will return records you use execute or executeQuery.&lt;br /&gt;
*if the SQL statement returns no records then you must use executeUpdate.&lt;br /&gt;
&lt;br /&gt;
=== If I use DLookup columns in MS Access what can I do in Base? ===&lt;br /&gt;
There are two parts to this answer, given that Base does not support DLookup column types in tables.&lt;br /&gt;
&lt;br /&gt;
When a table is displayed in a custom form use of a bound listbox will give you the same functionality. An example of [[adding a listbox to a form]] and to a grid control on a form is at this page.&lt;br /&gt;
&lt;br /&gt;
In a table view ( double clicking on the table name ) there is no equivilant to this.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Base Documentation]]&lt;/div&gt;</summary>
		<author><name>Dale</name></author>
	</entry>
</feed>