run-time error '2465'

M

MyD0j0

TIA!

Error txt:

DB can't find the field 'field1' referred to in your expression.

(A2k running on winxp and win2000)The field does exist, is not
calculated in any way, will compile and once compiled, the error never
again rears its ugly head...

*********************************
Private Sub Form_Current()

Dim ctl As Control

If Me.field1 = "0000.0" Then
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox
Then
Controls(ctl.Name).Locked = True
End If
Next ctl
ElseIf Me.Field1 <> "0000.0" Then
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox
Then
Controls(ctl.Name).Locked = False
End If
Next ctl
End If

Me.Lookup1.Locked = False
Me.Lookup1.Enabled = True
Me.date5_Act.Locked = True
Me.date4_Act.Locked = True
Me.date3_Act.Locked = True
Me.date2_Act.Locked = True
Me.date1_Act.Locked = True

If IsNull(Me.date5_Act) = True Then
Me.Completedate5.Visible = True
Me.label74.Visible = False
ElseIf IsNull(Me.date5_Act) = False Then
Me.Completedate5.Visible = False
Me.label74.Visible = True
End If

If IsNull(Me.date4_Act) = True Then
Me.Completedate4.Visible = True
Me.Label73.Visible = False
ElseIf IsNull(Me.date4_Act) = False Then
Me.Completedate4.Visible = False
Me.Label73.Visible = True
End If

If IsNull(Me.date3_Act) = True Then
Me.Completedate3.Visible = True
Me.Label72.Visible = False
ElseIf IsNull(Me.date3_Act) = False Then
Me.Completedate3.Visible = False
Me.Label72.Visible = True
End If

If IsNull(Me.date2_Act) = True Then
Me.Completedate2.Visible = True
Me.Label71.Visible = False
ElseIf IsNull(Me.date2_Act) = False Then
Me.Completedate2.Visible = False
Me.Label71.Visible = True
End If

If IsNull(Me.date1_Act) = True Then
Me.CompleteDate1.Visible = True
Me.Label70.Visible = False
ElseIf IsNull(Me.date1_Act) = False Then
Me.CompleteDate1.Visible = False
Me.Label70.Visible = True
End If

End Sub
**************************************************
Thanks,

Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top