Enable/Disable Box

H

Hlewis

I am having trouble getting this to work. I have a form that has a "Status"
field and a "Response Date" field. I want to have the following code put the
current date/time in the "Response Date" field and then disable the field so
changes cannot be made. For some reason, I am getting an error message
"Method or Data member not found". How do I fix this?

Private Sub Status_AfterUpdate()

Select Case Status
Case "Active"
Me.[Response Date].Enabled = True

Case "Closed"
Me.[Response Date] = Date
Me.[Response Date].Enabled = False

End Select
End Sub
 
D

Douglas J. Steele

I'm assuming that your text box is bound to a field in the recordset named
Response Date. Try renaming your text box (say, to txtResponseDate) to
ensure that Access realizes you're referring to the text box, not the field
in the form's RecordSource.
 

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