Andrew,
No apologies necessary. I appreciate all the time you've spared me so far. I just wanted to say that I think I'm missing something here, so I'm sure your code works perfectly. Here's what I've been doing to try and get it. I downloaded and read the 'StarOffice 8 Programming Guide for Basic', at least the relevant parts. I have also gone over Andrew Pitonyak's ebook 'OpenOffice.org Macros Explained' and his 'Using Macros with OOo Base.' The StarOffice guide was helpful with core concepts but the Method calls seemed different than the ones you used and that are used in other OOBase macros. I haven't fully gone over Pitonyak's selections yet. I'm thinking now that I may have tried run before I could walk. As an example, you mentioned that the filter adds the WHERE clause to a query, is it assumed that I already have a query set up and that filter is appended to the end of the query when the macro is run? Is there someplace that I can see all the Methods available with their explanations and required parameters? It just doesn't seem that it should be this trying. I have taken a class in databases so I have a decent understanding of database concepts. I've programmed in Perl and C but with little knowledge or experience with Object Oriented programming. How did you get your depth of knowledge about OO macros? Is there someplace else I should start before trying to tackle this project?

Here's my macro:

REM  *****  BASIC  *****

Sub Main

End Sub

sub onApplyFilter( oEventStructure as variant )

dim oButton as variant

dim oTextBox as variant

dim oDataForm as variant


oButton = oEventStructure.Source

oDataForm = oButton.Model.Parent

oTextBox = oDataForm.getByName( "TextBox" )

MsgBox oTextBox.Text , 0          REM A Test point to verify the data

if oTextBox.Text <> "" then

oDataForm.Filter = "DocNo: ='" & oTextBox.Text & "'"

oDataForm.ApplyFilter = True

else

oDataForm.ApplyFilter = False

end if

oDataForm.Reload

end sub


--
Chris Moore
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to