A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

this code doesn't work fully



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old June 4th, 2010, 07:39 PM posted to microsoft.public.access.forms
Bob H[_4_]
external usenet poster
 
Posts: 161
Default this code doesn't work fully

I am trying to create a login box for an Access 2007 database using some
VB8 code I found:

Private Sub CreateAcc_Click()
Dim username As String
username = Text23
If Text23 = "" Then
MsgBox "Enter a Username !"
Else
If Text25 = "" Then
MsgBox "Enter a Password !"
Else
Open app.Path & "\Accounts\Users\" + username + ".txt" For Output As #1
Print #1, Text23
Print #1, Text25
Close #1
End If
End If

End Sub

It runs up to the line 'Open app.path etc, then get a runtime error 424,
Object required.
What would that be, and what should the correct syntax be for Open app.path

Thanks
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.