rogerio dandrea | 28 Jul 15:40 2011
Picon

(help macro base)Open form with a button form another form with filter

my macro dont apply filter why?

GLOBAL myindex as integer

sub pega( oev as variant )
dim odoc,oform,sfilter
odoc=thiscomponent
oform=odoc.drawpage.forms.getbyindex(0)
  'pega o dado da primeira linha(=index =campo Cad no meu caso) do registro
atual
         myindex=oform.getstring(1)

 ThisDatabaseDocument.FormDocuments.getByName( "animal3" ).open

  odoc=thiscomponent
     oform=odoc.drawpage.forms.getbyindex(0)

  'define o filtro para achar os registros

         sfilter =  chr(34) & "Cad" & chr(34) & chr(61) & myindex
         print sfilter
         oform.filter = sfilter
         oform.applyfilter= True
         oform.reload      ' recarrega o formulario com o filtro pelo na
teoria pois não esta funcionando
                                  'reload the form with the filter apply
dont work

end sub

(Continue reading)

Alexander Thurgood | 28 Jul 16:34 2011
Picon

Re: (help macro base)Open form with a button form another form with filter

Le 28/07/11 15:40, rogerio dandrea a écrit :

Hi Rogerio,

> 
>  ThisDatabaseDocument.FormDocuments.getByName( "animal3" ).open
> 
>   odoc=thiscomponent
>      oform=odoc.drawpage.forms.getbyindex(0)
> 
>   'define o filtro para achar os registros
> 
>          sfilter =  chr(34) & "Cad" & chr(34) & chr(61) & myindex
>          print sfilter
>          oform.filter = sfilter
>          oform.applyfilter= True
>          oform.reload      ' recarrega o formulario com o filtro pelo na
> teoria pois não esta funcionando
>                                   'reload the form with the filter apply
> dont work
> 

I could be wrong here, but you could try setting the focus on one of
this form's controls before attempting to reload, or alternatively you
might find you have to reload the first form that was opened in order to
get the second one to update. From memory, I think that there was a
discussion about this on the old OpenOffice.org dba discuss or user list.

Alex

(Continue reading)

rogerio dandrea | 28 Jul 22:11 2011
Picon

Re: Re: (help macro base)Open form with a button form another form with filter

Hi

Sorry if this is a silly question but, how do I switch the focus from one
form to another?

Thanks

2011/7/28 Alexander Thurgood <alex.thurgood <at> gmail.com>

> Le 28/07/11 15:40, rogerio dandrea a écrit :
>
> Hi Rogerio,
>
>
> >
> >  ThisDatabaseDocument.FormDocuments.getByName( "animal3" ).open
> >
> >   odoc=thiscomponent
> >      oform=odoc.drawpage.forms.getbyindex(0)
> >
> >   'define o filtro para achar os registros
> >
> >          sfilter =  chr(34) & "Cad" & chr(34) & chr(61) & myindex
> >          print sfilter
> >          oform.filter = sfilter
> >          oform.applyfilter= True
> >          oform.reload      ' recarrega o formulario com o filtro pelo na
> > teoria pois não esta funcionando
> >                                   'reload the form with the filter apply
> > dont work
(Continue reading)

Alexander Thurgood | 28 Jul 23:54 2011
Picon

Re: (help macro base)Open form with a button form another form with filter

Le 28/07/11 22:11, rogerio dandrea a écrit :

Hi Rogerio,

> 
> Sorry if this is a silly question but, how do I switch the focus from one
> form to another?
> 

I actually looked this up on the OpenOffice.org forum, but I can't find
the link to the post anymore. There might also be a bug in LibreOffice
that prevents the form from reloading. I seem to recall having seen
something similar somewhere, because the filter.appply = true and
form.reload used to work with OpenOffice.org.

Alex

--

-- 
Unsubscribe instructions: E-mail to users+help <at> global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

rogerio dandrea | 29 Jul 11:59 2011
Picon

Re: Re: (help macro base)Open form with a button form another form with filter

Alex ,
 thank you.
I will return to the problem when version 3.4.2 is launched (in july)

2011/7/28 Alexander Thurgood <alex.thurgood <at> gmail.com>

> Le 28/07/11 22:11, rogerio dandrea a écrit :
>
> Hi Rogerio,
>
> >
> > Sorry if this is a silly question but, how do I switch the focus from one
> > form to another?
> >
>
> I actually looked this up on the OpenOffice.org forum, but I can't find
> the link to the post anymore. There might also be a bug in LibreOffice
> that prevents the form from reloading. I seem to recall having seen
> something similar somewhere, because the filter.appply = true and
> form.reload used to work with OpenOffice.org.
>
>
> Alex
>
>
>
>
>
> --
> Unsubscribe instructions: E-mail to users+help <at> global.libreoffice.org
(Continue reading)

rogerio dandrea | 4 Aug 14:36 2011
Picon

Re: Re: (help macro base)Open form with a button form another form with filter

well now

with 3.4.2
ubuntu11.04 64bits
and use hsql

 now I have error mensage in filter Why?

2011/7/29 rogerio dandrea <rolemosda <at> gmail.com>

> Alex ,
>  thank you.
> I will return to the problem when version 3.4.2 is launched (in july)
>
>
>
>
> 2011/7/28 Alexander Thurgood <alex.thurgood <at> gmail.com>
>
>> Le 28/07/11 22:11, rogerio dandrea a écrit :
>>
>> Hi Rogerio,
>>
>> >
>> > Sorry if this is a silly question but, how do I switch the focus from
>> one
>> > form to another?
>> >
>>
>> I actually looked this up on the OpenOffice.org forum, but I can't find
(Continue reading)

rogerio dandrea | 5 Aug 23:03 2011
Picon

Re: Re: (help macro base)Open form with a button form another form with filter

the basetools extension (0.0.5) works in libreoffice 3.4.2 ?

2011/8/4 rogerio dandrea <rolemosda <at> gmail.com>

> well now
>
> with 3.4.2
> ubuntu11.04 64bits
> and use hsql
>
>  now I have error mensage in filter Why?
>
>
> 2011/7/29 rogerio dandrea <rolemosda <at> gmail.com>
>
>> Alex ,
>>  thank you.
>> I will return to the problem when version 3.4.2 is launched (in july)
>>
>>
>>
>>
>> 2011/7/28 Alexander Thurgood <alex.thurgood <at> gmail.com>
>>
>>> Le 28/07/11 22:11, rogerio dandrea a écrit :
>>>
>>> Hi Rogerio,
>>>
>>> >
>>> > Sorry if this is a silly question but, how do I switch the focus from
(Continue reading)

rogerio dandrea | 14 Aug 04:44 2011
Picon

Re: Re: (help macro base)Open form with a button form another form with filter

Yes, now is works, but i can't insert new record in filter form.

sub pega( oev as variant)
Dim Filter As String
dim odoc,odoc2,oform2,oform as Object
 odoc=thiscomponent
  oform=odoc.drawpage.forms.
getbyindex(0)

  'pega o dado da primeira linha(=index =campo Cad no meu caso) do registro
atual
  myindex=oform.getstring(1)

 'ThisDatabaseDocument.FormDocuments.getByName( "animal3" ).open
oform2=ThisDatabaseDocument.FormDocuments.getByName( "animal3" )
oform2.Open
oform2 = oform2.Component.DrawPage.Forms.getbyindex(0)

  'define o filtro para achar os registros

        oform2.filter ="animal3.Cad ='" & myindex &"'"
        oform2.ApplyFilter= True
        oform2.reload

End Sub

2011/8/5 rogerio dandrea <rolemosda <at> gmail.com>

> the basetools extension (0.0.5) works in libreoffice 3.4.2 ?
>
(Continue reading)

Andreas Säger | 14 Aug 19:42 2011
Picon

Re: (help macro base)Open form with a button form another form with filter

All this is perfectly doable even without a single line of silly Basic:
http://user.services.openoffice.org/en/forum/viewtopic.php?f=83&t=40493

--

-- 
For unsubscribe instructions e-mail to: users+help <at> global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

rogerio dandrea | 15 Aug 11:55 2011
Picon

Re: Re: (help macro base)Open form with a button form another form with filter

Ok , But I need to fix myindex value in new record.

      animal3.cad = myindex not automatic in new record

2011/8/14 Andreas Säger <villeroy <at> t-online.de>

> All this is perfectly doable even without a single line of silly Basic:
> http://user.services.**openoffice.org/en/forum/**
> viewtopic.php?f=83&t=40493<http://user.services.openoffice.org/en/forum/viewtopic.php?f=83&t=40493>
>
>
> --
> For unsubscribe instructions e-mail to: users+help <at> global.libreoffice.**
> org <users%2Bhelp <at> global.libreoffice.org>
>
> Problems? http://www.libreoffice.org/**get-help/mailing-lists/how-to-**
> unsubscribe/<http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/>
> Posting guidelines + more: http://wiki.**documentfoundation.org/**
> Netiquette <http://wiki.documentfoundation.org/Netiquette>
> List archive: http://listarchives.**libreoffice.org/global/users/<http://listarchives.libreoffice.org/global/users/>
> All messages sent to this list will be publicly archived and cannot be
> deleted
>
>

--

-- 
For unsubscribe instructions e-mail to: users+help <at> global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
(Continue reading)

rogerio dandrea | 15 Aug 16:07 2011
Picon

Re: Re: (help macro base)Open form with a button form another form with filter

 ok I have  the answer here
http://www.oooforum.org/forum/viewtopic.phtml?t=28839

2011/8/15 rogerio dandrea <rolemosda <at> gmail.com>

> Ok , But I need to fix myindex value in new record.
>
>       animal3.cad = myindex not automatic in new record
>
>
>
>
> 2011/8/14 Andreas Säger <villeroy <at> t-online.de>
>
>> All this is perfectly doable even without a single line of silly Basic:
>> http://user.services.**openoffice.org/en/forum/**
>> viewtopic.php?f=83&t=40493<http://user.services.openoffice.org/en/forum/viewtopic.php?f=83&t=40493>
>>
>>
>> --
>> For unsubscribe instructions e-mail to: users+help <at> global.libreoffice.**
>> org <users%2Bhelp <at> global.libreoffice.org>
>>
>> Problems? http://www.libreoffice.org/**get-help/mailing-lists/how-to-**
>> unsubscribe/<http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/>
>> Posting guidelines + more: http://wiki.**documentfoundation.org/**
>> Netiquette <http://wiki.documentfoundation.org/Netiquette>
>> List archive: http://listarchives.**libreoffice.org/global/users/<http://listarchives.libreoffice.org/global/users/>
>> All messages sent to this list will be publicly archived and cannot be
>> deleted
(Continue reading)


Gmane