billcute
asked on
Invalid Reference to property Tab Index
I use the line code below to check as I go through my form. I code along with a function both on the fly checking up to current tab index and also total checking for submitting. Any suggestion as to how correct this error?
Run-Time Error '2455':
"You entered an expression that has an invalid reference to the property Tab Index"
...on this line..
If mCtl.Properties("TabIndex" ) <= Screen.ActiveControl.Prope rties("Tab Index") Then
End If
...............from this function below:
Public Function chkCtl(ByRef mCtl As Control) As Boolean
chkCtl = True
If mCtl.Properties("TabIndex" ) <= Screen.ActiveControl.Prope rties("Tab Index") Then
Select Case ExtractTag(mCtl.Tag, 2)
Case "ne"
If Len(Nz(mCtl.Value)) = 0 Then chkCtl = False
Case "1ne"
If Len(Screen.ActiveForm.txtP ermitNo) > 0 And Len(Nz(mCtl.Value)) = 0 Then chkCtl = False
Case ">0"
If Not Nz(mCtl.Value) > 0 Then chkCtl = False
Case "tf"
If Nz(mCtl.Value, 99) <> 0 And Nz(mCtl.Value, 99) <> -1 Then chkCtl = False
End Select
End If
End Function
Run-Time Error '2455':
"You entered an expression that has an invalid reference to the property Tab Index"
...on this line..
If mCtl.Properties("TabIndex"
End If
...............from this function below:
Public Function chkCtl(ByRef mCtl As Control) As Boolean
chkCtl = True
If mCtl.Properties("TabIndex"
Select Case ExtractTag(mCtl.Tag, 2)
Case "ne"
If Len(Nz(mCtl.Value)) = 0 Then chkCtl = False
Case "1ne"
If Len(Screen.ActiveForm.txtP
Case ">0"
If Not Nz(mCtl.Value) > 0 Then chkCtl = False
Case "tf"
If Nz(mCtl.Value, 99) <> 0 And Nz(mCtl.Value, 99) <> -1 Then chkCtl = False
End Select
End If
End Function
ASKER
MX,
I tried this one based on your suggestion above and I still received the same error upon clicking the btnAddNew button
If mCtl.Properties("mCtl.TabI ndex") <= Screen.ActiveControl.Prope rties("mCt l.TabIndex ") Then
I tried this one based on your suggestion above and I still received the same error upon clicking the btnAddNew button
If mCtl.Properties("mCtl.TabI
Hi Bill and Mx
Good to see you guys around. Try this and see if it works for you:
If mCtl.TabIndex <= Screen.ActiveControl.TabIn dex Then
PDP
Good to see you guys around. Try this and see if it works for you:
If mCtl.TabIndex <= Screen.ActiveControl.TabIn
PDP
PS:
Bill,
I think the syntax I used above is what Mx was trying to tell you to use, so if it works, he deserves the points.
PDB
Bill,
I think the syntax I used above is what Mx was trying to tell you to use, so if it works, he deserves the points.
PDB
Bill ... I meant what pDog posted ... not this:
If mCtl.Properties("mCtl.TabI ndex") <= Screen.ActiveControl.Prope rties("mCt l.TabIndex ") T
I see what you did now. Try what pDog posted ...
mx
If mCtl.Properties("mCtl.TabI
I see what you did now. Try what pDog posted ...
mx
ASKER
Hi PDB,
Long time. Are you okay?
You will not beleive that these code used to work. Suddenly some are failing. I dont know why. I tried re-tracing steps, but failed.
Also on one of my current posts, your once assisted line code added to my control tab doesnt work anymore...
.....things are changing fast.
Back to the topic, your posted amendment did not work either. I received an error..
"object doesnt support this property or method."
Regards
Bill
Long time. Are you okay?
You will not beleive that these code used to work. Suddenly some are failing. I dont know why. I tried re-tracing steps, but failed.
Also on one of my current posts, your once assisted line code added to my control tab doesnt work anymore...
.....things are changing fast.
Back to the topic, your posted amendment did not work either. I received an error..
"object doesnt support this property or method."
Regards
Bill
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
"Suddenly some are failing. "
Did you happen to install Service Pack 3 (SP3) ?? There are MANY issues, apparently ... stuff that worked ... doesn't.
mx
Did you happen to install Service Pack 3 (SP3) ?? There are MANY issues, apparently ... stuff that worked ... doesn't.
mx
ASKER
MX,
I am using Windows Vista with all the current Updates up-to-date
I am using Windows Vista with all the current Updates up-to-date
ASKER
MX,
I am also using Ms Access 2003 with all the updates installed
I am also using Ms Access 2003 with all the updates installed
ASKER
mx,
Please accept my sincere gratitude for assisting.
PDB's posted code above resolved the conflict. More importantly, the link PDB provided was an added bonus. It was as if "qwqaw" wrote the triple generic code for me. No errors at all - it worked on the fly.
I appreciated your assistance but I am convinced that PDB deserves the credit.
Regards
Bill
Please accept my sincere gratitude for assisting.
PDB's posted code above resolved the conflict. More importantly, the link PDB provided was an added bonus. It was as if "qwqaw" wrote the triple generic code for me. No errors at all - it worked on the fly.
I appreciated your assistance but I am convinced that PDB deserves the credit.
Regards
Bill
Bill,
Thanks. I am glad I was able to help resolve your problem. No worries about Mx...he and I have participated on many questions together, and both of us are amenable to whatever split is decided upon.the original poster. Take care and best wishes for continued success with your project.
PDB
Thanks. I am glad I was able to help resolve your problem. No worries about Mx...he and I have participated on many questions together, and both of us are amenable to whatever split is decided upon.the original poster. Take care and best wishes for continued success with your project.
PDB
mCtl.TabIndex ?
mx