this code doesn't work fully
On 04/06/2010 23:23, Bob H wrote:
On 04/06/2010 20:50, Daniel Pineault wrote:
To pull the path of your currently open database you'd use:
Application.CurrentProject.Path
Ok thanks, but where does this line fit in with the other lines.
Do I have to actually create the path first then put it in the line.
Thanks
Update:
I have used this line to create a text file with given information:
Open "C:\Accounts\Users\" + username + ".txt" For Output As #1
Print #1, Text23
Print #1, Text25
But now on another cmd button I want access to read that said
information in that text file, and grant access.
With this line:
Open "C:\Accounts\Users\" + username + ".txt" For Output As #2
Input #2, openfile
If username.Text = openfile Then
Input #2, datafile
Access throws up a runtime error 54 'Bad File mode' at Input #2 ,
openfile openfile
Also the information in the previously created text file has been deleted.
Thanks
|