Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!! Runtime error 2465

Status
Not open for further replies.

crowee

Technical User
May 17, 2001
24
US
Private Sub Form_Current()
'For full-time position, display a message
'and the wage field value in red
'For all other positions, display the wage field value
'in black without a message
If [Hours/Week] >= 40 Then
[FullTimeMsg].Visible = True
[Wage].ForeColor = 255
Else
[FullTimeMsg].Visible = False
[Wage].ForeColor = o
End If

End Sub

When I run this I get the runtime Error 2465 Microsoft can't find the field '|' referred to in your expression.

I am so stumped and I have no idea what to do. Am Lost and need help !!!!!!!!!!
Thanks
 
When I debug it comes up highlighting under
Else
[FullTimeMsg].Visible = False
This statement is highlighted. What could be wrong
 
Try using parentheses () rather than brackets [] around the Hours/Weeks. Access doesn't always highlight the actual problem.
 
when I do that I get a runtime error 6 overflow
 
Sorry, I thought Hours/Week was a calculation, not a field name. It's an invalid field name. You can't use "/" as a field name character. Change it to HoursPerWeek.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top