Click here to Skip to main content
16,018,653 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
am using this code to read data but sometimes Access file Hange and i have to use Task Manager to close app

St="~~~~~"
Input #1,St
Debug.Print Left(St,Len(St)+2)

i could not set the length of string to including all character was recieved maybe data was 20 Len Maybe 64 Or More

What I have tried:

nothing to do confused really maybe i m goinig on wrong way
Posted
Updated 12-Jan-22 8:17am
Comments
CHill60 4-Jan-22 8:15am    
If Access is hanging then this must be in a loop? Share all of the relevant code.

if you want to read from file line by line use this method:
Sub ReadFromTextFile()
Dim intFile As Integer, strFile As String, strText As String, strInput As String
intFile = FreeFile()
strFile = "C:\mydocs\myTest.txt" '<
 
Share this answer
 
Comments
CHill60 13-Jan-22 4:32am    
This is incomplete - and should have been added to your original solution not posted as another one. Posting multiple solutions just confuses matters - which one is intended to be a solution. If you need clarification on the question then use the "Have a Question or Comment?" link instead
if you are looking to get input from user for example, you can use this method that ask user name:
Sub Test()
Dim strTemp As String
strTemp = InputBox("Please enter your Name", "Enter Name", "")

If Len(strTemp) > 0 Then
MsgBox "Your name is:" & strTemp
Else
MsgBox "No name provided"
End If
End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900