Tech Support Guy banner
Status
Not open for further replies.

Editing downloaded data

Solved 
6K views 209 replies 5 participants last post by  OBP 
#1 ·
Tech Support Guy System Info Utility version 1.0.0.4
OS Version: Microsoft Windows 10 Home, 64 bit
Processor: Intel(R) Core(TM) i3-3227U CPU @ 1.90GHz, Intel64 Family 6 Model 58 Stepping 9
Processor Count: 4
RAM: 3977 Mb
Graphics Card: Intel(R) HD Graphics 4000, -2043 Mb
Hard Drives: C: 454 GB (402 GB Free);
Motherboard: Dell Inc., 033MX4
Antivirus: Windows Defender, Enabled and Updated
> I added this: I am using Windows Office Pro 2016
Am I going to have to do this each time I post?

I download data from Brisnet daily which I have to edit in order to use it. Since I started this, I have been doing it manually which is too time consuming. I am here to see if it can be automated and,if so, how?

Here are 2 files on Notepad. "Unedited" is as it downloads and "HOU" is after editing. I do this to put it into ACCESS and query for results. Now, if someone shows me how I can download the data directly into ACCESS as a usable table, I will name my next child for him/her! Automating this process will save plenty of time, so let us not explore that right now.

If you need additional info, ask.
 

Attachments

See less See more
#128 ·
No you only want one
Open strFile For Input As #1
and one
Close #1
So it looks like this

strFile = Me.FilePath
Open strFile For Input As #1
Line Input #1, strInput
Close #1

and then change the Message to

MsgBox "opened file OK and imported - " & strInput
 
#132 ·
Yes that is the first line of data in the Text file, so on your computer you can use this code to import the data.

So can you go back to the VBA Editor and change this line
Dim strFile As String

To this
Dim strFile As String, strInput as String
 
#134 ·
Great, we can import stuff but we need somewhere to put it.
I created a table called "Horse Imports" with 2 fields called Import Number & Horse Name.
Do you want to do the same or do you already have a table that you use?
The attached Excel screenshot shows what the table and imported data look like
 

Attachments

#135 ·
Currently, doing it the copy and paste way with the data in .txt form, I import just the 2 fields: PPP and HORSE. Since I delete each of these as soon as I use them, the PPP is the key field. Using these 2 field designations they match my Main Database and the query I use works well. I believe all that would change if I use different field names.

I attempted to create the table, but I can't get out of this to my database.

HELP !!
 

Attachments

#141 ·
OK, view 2 shows that you have entered data in to the fields rather than enter field names, I hate that default view of the table.
So put the table in design view (3) and change the field names
from field1 to PPP
and field2 to Horse
 
#147 ·
No unfortunately not, but I still enjoyed it.
To move on we need for you to re-open the VBA Editor by your method.
You need to change this line
Dim strFile As String, strInput As String
to
Dim strFile As String, strInput As String, varSplit As Variant, intCount As Integer, rs As Object, i As Integer, n As Long
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top