Why is my form locking up my computer?

tbochman

New member
Local time
Today, 19:49
Joined
May 25, 2001
Messages
8
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
 
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
 
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
 
The name of your control should not be the same as the control source name, check the name in the property sheet.
 

Users who are viewing this thread

Back
Top Bottom