Everything is working fine on my form without the tab control. I added the tab control to cut down on screen space. Ever since I added the tab control, there is one page in which the command buttons do nothing. There are about 5 command buttons that, when clicked, do not perform their specified action. I will list two of them for a examples.
This command button is on a tab located on pgAttachments:
Attachment is a textbox located on the tab called pgLease
This command button also does noting when clicked, but here is the code being used:
This command button is on a tab located on pgAttachments:
Code:
Private Sub cmdView_Click() VBA.Shell "Explorer.exe " & Chr(34) & Attachment & Chr(34), vbNormalFocus End Sub
This command button also does noting when clicked, but here is the code being used:
Code:
Private Sub cmdAttachSLA_Click() Dim strTable As String, strColumns As String, strValues As String Dim strFile As String Dim strFilter As String Dim SLAcounter As Integer Dim strSQL As String Dim strSLAName As String strSLAName = InputBox("What would you like to name this SLA?" & vbCrLf & vbCrLf & "Example: SLA 2", "SLA Name") If Len(strSLAName) > 1 Then strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*") strFile = ahtCommonFileOpenSave( _ OpenFile:=True, _ Filter:=strFilter, _ Flags:=ahtOFN_OVERWRITEPROMPT Or ahtOFN_READONLY) strTable = "tblSLA" strColumns = "(LeaseID, SLAAttachment, SLAName)" strValues = "(" & Me.LeaseID & ", '" & strFile & "', '" & strSLAName & "')" strSQL = "INSERT INTO " & strTable & " " & strColumns & " VALUES " & strValues & ";" DoCmd.RunSQL strSQL End If cmbSLA.Requery countSLAs End Sub
Comment