Sub onMouseRelease(e)
If e.Buttons = 1 and e.ClickCount = 2 and e.Modifiers = 0 and e.PopupTrigger = False then
msgbox "Yep"
Sub onMouseRelease(e)
Static X As Integer
If X=0 and e.Buttons = 1 and e.ClickCount = 2 and e.Modifiers = 0 and e.PopupTrigger = False then
X=X+1
msgbox X
My formula structure is giving into piece attachment :
FORM_CATALOGUEDOCUMENTAIRES
+ Mainform
+ SubFormPlanClassement
v = Application.getObject("Forms!Mainform!SubFormPlanClassement")
v = Application.getObject("Forms!Mainform!SubFormPlanClassement")
v = Application.getObject("Forms!theformname!Mainform!SubFormPlanClassement")
v = Application.getObject("Forms!CATALOGUEDOCUMENTAIRES!SubFormPlanClassement")
Application.getObject("Forms!FORM_TACHES_A_FAIRE!SubFormFiltre.Form!CTRL_PERIODES") >> Error, Access2Base can't find SubFormFiltre, because it look for a suib form of MainForm...
Application.getObject("Forms!FORM_TACHES_A_FAIRE!..!SubFormFiltre.Form!CTRL_PERIODES") >> I need a go up one level up to MainForm before to down to SubFormFilter...
Error # 1510 (DFunction execution failed, SQL = SELECT TOP 1 "Nom interprete" AS "TEMP83032" FROM "req_liste_par_inter_princ" WHERE "RefEnregistrement" = '364') occurred in DLookup
Case "FIREBIRD"
Case "FIREBIRD", "FIREBIRD (ENGINE12)"
For i =0 to Application.AllDialogs().count-1
content = content & ";" & Application.AllDialogs(i).Name & " >> " & Application.AllDialogs(i).IsLoaded & CHR(10)
Next i
MsgBox content
Set oDlg = Application.getObject("Dialogs!DlgFondsDesNotices")
REM ***** BASIC *****
'-----------------------------------------------------------------------------
Sub DlgFondsDesNotices_Show()
Dim dp as Object ' com.sun.star.awt.DialogProvider2
Dim dialog As Object ' com.sun.star.awt.XDialog, com.sun.star.awt.XDialogEventHandler
Dim eventHandler As Object ' com.sun.star.awt.XDialogEventHandler
dp = CreateUnoService("com.sun.star.awt.DialogProvider2")
dp.Initialize(Array(ThisComponent)) ' si intégrée au document
eventHandler = CreateUnoListener("HandlerDlgFondsDesNotices_", "com.sun.star.awt.XDialogEventHandler")
dialog = dp.createDialogWithHandler("vnd.sun.star.script:UIDialogs.DlgFondsDesNotices?location=document", eventHandler)
dialog.Title = "Fonds des notices"
'dialog.Start
_InitDefaultContent()
dialog.execute()
'Dialog.Terminate
End Sub
'-----------------------------------------------------------------------------
Function HandlerDlgFondsDesNotices_callHandlerMethod(dialog as Object, _
event As com.sun.star.document.DocumentEvent, _
method As String) As Boolean
''' Intercept dialog events using .UNO protocol '''
DlgFondsNotices_callHandlerMethod = True
Select Case method
Case "_UpdateList"
Case "_openHelp"
MsgBox "Not yet implemented",0 , "Howdy"
'dialog.endDialog(1) if computer-based dialog
Case Else : DlgFondsNotices_callHandlerMethod = False
End Select
End Function ' <Handler>.DlgFondsDesNotices_callHandlerMethod
'-----------------------------------------------------------------------------
Function HandlerDlgFondsDesNotices_getSupportedMethodNames()
DlgFondsNotices_getSupportedMethodNames = Array("_UpdateList", "_openHelp")
End Function ' <Handler>.DlgFondsDesNotices _getSupportedMethodNames
'-----------------------------------------------------------------------------
Sub _InitDefaultContent()
Dim ocList As Object
Dim orsRecords As Object
Dim content As string
Dim SEP As String
Dim oDlg As Object
Dim v As Variant
Dim i As Integer
For i =0 to Application.AllDialogs().count-1
content = content & ";" & Application.AllDialogs(i).Name & " >> " & Application.AllDialogs(i).IsLoaded & CHR(10)
Next i
MsgBox content
Set oDlg = Application.getObject("Dialogs!UIDialogs.DlgFondsDesNotices")
Set ocList = oDlg.Controls("ListTypeFonds")
SEP = ""
Set orsRecords = Application.CurrentDb().OpenRecordset("SELECT [CATEGORIE], [ID] FROM [AUTLESCATEGORIES] WHERE [SERIE] = 'TYPEFONDS' ORDER BY [CATEGORIE] ASC", , , dbReadOnly)
With orsRecords
If Not .BOF Then ' An empty recordset has both .BOF and .EOF set to True
Do While Not .EOF
content = content & SEP & orsRecords.Fields("CATEGORIE").value
SEP = ";"
.MoveNext
Loop
End If
.mClose()
End With
ocList.RowSource = content
ocList.ListIndex = 0
End Sub
Users browsing this forum: No registered users and 4 guests