View Full Version : Why is my form locking up my computer?


tbochman
07-06-2001, 01:32 PM
Whenever I open my form my computer goes into some kind of a loop and I have to force access to close. The problem I think is in the following code...

Private Sub name_Change()

If IsNull(Form![directory Name]) Then Me![directory Name] = Me![name]

End Sub

What I want to do is when the value of “name” is changed IF “directory name” is empty to copy the value of name to it. What is the best way to do this? Why is my code locking up my computer?

Thanks for the help.
Tim

Rich
07-06-2001, 02:00 PM
In the form's CurrentEvent
Try: If IsNull(Me.directory_Name) Then
Me.directory_Name = Me.name
In the change event for name put Form_Current
HTH

tbochman
07-09-2001, 05:30 AM
It still isn't working... In the name of the form in the Directory_name field. Is this possibly a problem because Me.name is something in access that puts the name of the form in? Should I change the label on my name field to something else?

Thanks for the help

Tim

Rich
07-09-2001, 08:29 AM
The name of your control should not be the same as the control source name, check the name in the property sheet.