SaranPriya-7954
New member
- Local time
- Today, 01:33
- Joined
- Aug 13, 2021
- Messages
- 20
The following is my code and I am having problems in making my Menu expand from 9 buttons items to 12.
I am getting a "The expression after update you entered as the event property setting produced the following error:"
It's a issues that arises when I click on my menu buttons. To whom ever will assist thank you for your time.
Option Compare Database
Dim db As Database
Dim rs As Recordset
Private Function SetBt()
Dim Ax As Single
Ax = CSng(Right(Me.ActiveControl.Name, 2))
'If CurParam(1100 + Ax, True) = False Then Exit Function
'MsgBox Ax
'Dim i As Integer
For i = 1 To 12
Me("B" & i).BackColor = Box18.BackColor
Next
Me.ActiveControl.BackColor = Box1.BackColor
Me("P" & Ax).SetFocus
'lb0.Caption = Me("B" & Ax).Caption
'Show SubTab
Dim j As Integer
Dim PageNameDigitLen As Integer 'New line of code
PageNameDigitLen = Len("P" & Ax) 'New line of code
For j = 0 To SubTab.Pages.Count - 1
If Left(SubTab.Pages(j).Name, 2) = Me("P" & Ax).Name Then
SubTab.Pages(j).Visible = True
Else
SubTab.Pages(j).Visible = False
End If
Next j
End Function
End Function
I am getting a "The expression after update you entered as the event property setting produced the following error:"
It's a issues that arises when I click on my menu buttons. To whom ever will assist thank you for your time.
Option Compare Database
Dim db As Database
Dim rs As Recordset
Private Function SetBt()
Dim Ax As Single
Ax = CSng(Right(Me.ActiveControl.Name, 2))
'If CurParam(1100 + Ax, True) = False Then Exit Function
'MsgBox Ax
'Dim i As Integer
For i = 1 To 12
Me("B" & i).BackColor = Box18.BackColor
Next
Me.ActiveControl.BackColor = Box1.BackColor
Me("P" & Ax).SetFocus
'lb0.Caption = Me("B" & Ax).Caption
'Show SubTab
Dim j As Integer
Dim PageNameDigitLen As Integer 'New line of code
PageNameDigitLen = Len("P" & Ax) 'New line of code
For j = 0 To SubTab.Pages.Count - 1
If Left(SubTab.Pages(j).Name, 2) = Me("P" & Ax).Name Then
SubTab.Pages(j).Visible = True
Else
SubTab.Pages(j).Visible = False
End If
Next j
End Function
End Function
Last edited: