Access.2007.VBA.Bibl..
Figure 13.6 Entering the COM add-in’s identifying information and other options in the Designer dialog. The Designer code includ ...
I added the StripCharsfunction to this module; it is called throughout the add-in to remove various characters and spaces from c ...
Public Sub AddInErr(errX As ErrObject) Displays message box with error information Dim strMsg As String strMsg = _ “An error occ ...
The procedures starting with Private Sub IDTExtensibility2are the events supported by this library. You need to have all five ev ...
The AccessDesigner code is listed next, with the specific modifications needed to implement the add-in’s functionality, using th ...
Constants for characters surrounding ProgID Const PROG_ID_START As String = “!<” Const PROG_ID_END As String = “>” Private ...
Calls shared code to create a new command bar button to rename controls on a form or report. On Error GoTo ErrorHandler Set frmc ...
ErrorHandler: AddInErr Err Resume ErrorHandlerExit End Sub Private Sub frmcbb_Click(ByVal ctl As _ Office.CommandBarButton, Canc ...
Add the new button. Set cbbAddIn = _ cbrMenu.Controls.Add(Type:=msoControlButton, _ Parameter:=”Rename Form Controls”) Set the b ...
Return a reference to the command bar.. Set cbrMenu = pappAccess.CommandBars(“Report Design”) Add a button to call the add-in fr ...
This procedure removes the command bar buttons for the add-in if the user disconnected it. On Error Resume Next If the user unlo ...
Determine whether original the control names should be stored in the Tag property. pstrMessage = _ “When processing form control ...
Case acListBox strPrefix = “lst” i = ControlCS(pctl, strPrefix, blnTag) Case acOptionGroup strPrefix = “fra” i = ControlCS(pctl, ...
Case acLine strPrefix = “lin” i = ControlNA(pctl, strPrefix, blnTag) Case acPage strPrefix = “pge” i = ControlNA(pctl, strPrefix ...
the control. The bound controls, for example, create a name using the name of the bound field; labels create a name using captio ...
and ask if the new name is acceptable. pintRenameFail = True Do While pintRenameFail pintRenameFail = False pintReturn = MsgBox( ...
Else AddInErr Err Resume ErrorHandlerExit End If Resume Next End Function Public Function ControlCA(ctl As Access.Control, _ str ...
ElseIf Right(pstrNewCtlName, 5) = “Label” Then pstrNewCtlName = Left(pstrNewCtlName, _ Len(pstrNewCtlName) - 5) End If pintRenam ...
Does group renaming of all controls with source objects on a form or report. ‘Called from RenameFormControls and RenameReportCon ...
& ctl.ControlType) _ & “ control currently named “ & pstrOldCtlName _ & vbCrLf & “(source object: “ & ps ...
«
19
20
21
22
23
24
25
26
27
28
»
Free download pdf