View Single Post
  #5  
Old June 4th, 2010, 08:57 PM posted to microsoft.public.access.forms
Bob H[_4_]
external usenet poster
 
Posts: 161
Default this code doesn't work fully

Thanks for the coding but now I get runtime error 2465 at the line:
username = Me!Text23& vbNullString.

Thanks

On 04/06/2010 20:21, Douglas J. Steele wrote:
There is no App object in Access.

Private Sub CreateAcc_Click()
Dim intFile As Integer
Dim username As String

username = Me!Text23& vbNullString
If Len(username) = 0 Then
MsgBox "Enter a Username !"
Else
If Len(Me!Text25& vbNullString) = 0 Then
MsgBox "Enter a Password !"
Else
intFile = FreeFile()
Open CurrentProject.Path& "\Accounts\Users\"& username& ".txt" For
Output As #intFile
Print #intFile, Me!Text23
Print #intFile, Me!Text25
Close #intFile
End If
End If

End Sub