![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I get an runtime error w/ this code If Me!Obj = 5100 Then runtime error 13 type mismatch what is this testing for? IE: 5100 jim Private Sub Form_Current() DoCmd.Maximize If Me!Obj = 5100 Then Me.AbbrevShadow.ForeColor = 65535 Else Me.AbbrevShadow.ForeColor = 16776960# End If Me!FedPerc = (Me!SubgAmt / (Me!SubgAmt + Me!MatchAmt)) * 100 If Me!FedPerc > 80 And Me![AgencyType] <> "Native Am." Then With Me!FedPerc .ForeColor = 255 .FontBold = True .BackColor = RGB(255, 255, 255) End With ElseIf Me!FedPerc > 95 And Me![AgencyType] = "Native Am." Then With Me!FedPerc .ForeColor = 255 .FontBold = True .BackColor = RGB(255, 255, 255) End With ElseIf Me!FedPerc <= 80 And Me![AgencyType] <> "Native Am." Then With Me!FedPerc .ForeColor = 0 .FontBold = False .BackColor = RGB(255, 204, 153) End With ElseIf Me!FedPerc <= 95 And Me![AgencyType] = "Native Am." Then With Me!FedPerc .ForeColor = 0 .FontBold = False .BackColor = RGB(255, 204, 153) End With End If If Me!fsubComply![chkProjInc] = -1 Then Me!fsubFSRdoc![cmdProjInc].Visible = True Me!fsubFSRdoc![lblPI].Visible = True Me!fsubFSRdoc![boxPI].Visible = True Me!fsubFSRdoc![lblBillings].Visible = True Me!fsubFSRdoc![lblCollections].Visible = True Me!fsubFSRdoc![lblExpenditures].Visible = True Me!fsubFSRdoc![Billings].Visible = True Me!fsubFSRdoc![Collections].Visible = True Me!fsubFSRdoc![Expenditures].Visible = True Else Me!fsubFSRdoc![cmdProjInc].Visible = False Me!fsubFSRdoc![lblPI].Visible = False Me!fsubFSRdoc![boxPI].Visible = False Me!fsubFSRdoc![lblBillings].Visible = False Me!fsubFSRdoc![lblCollections].Visible = False Me!fsubFSRdoc![lblExpenditures].Visible = False Me!fsubFSRdoc![Billings].Visible = False Me!fsubFSRdoc![Collections].Visible = False Me!fsubFSRdoc![Expenditures].Visible = False End If End Sub |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Thanks Wayne too bad I really have no idea what you are talking about ....this is a 97 mdb converted to a 2003 by the way. I dont know how to find the 'obj' ...is there a good vba book you reco? jim |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
wayne thanks for the info...and your time. I did find this in the macro code this error is occuring. Private Sub Obj_BeforeUpdate(Cancel As Integer) End Sub this is defined as obj in the project explorer. It seems I can delet it as it does nothing. |
![]() |
| Thread Tools | |
| Display Modes | |
| |