enabled update button

  • Thread starter Thread starter tracktraining
  • Start date Start date
T

tracktraining

Hello ALL,

I would like to have my UPDATE button to be enabled when the txtdocid and
txtrev fields have some data in it...... I wrote the code as follows:

If Not IsNull(Me.txtDocID) And Not IsNull(Me.txtRev) Then
Me.UpdateTrain.Enabled = True
End If

When I enter something in both the txtdocid and txtrev, the update button is
not enabled.

Please help.

thanks!
 
This is where the code is:

Private Sub txtRev_GotFocus()

'Enable the Update button if a DocID has been entered in search criteria
and
'a revision has been entered in the Rev. field
If Not IsNull(Me.txtDocID) And Not IsNull(Me.txtRev) Then
Me.UpdateTrain.Enabled = True
End If
End Sub
 
Back
Top