O
Ocean
I have a text file that contains text that will look a bit like this:
======================
UserName: Joe Bloggs
Password: orange1
Register Address: False
<StartName>Joe Bloggs<EndName>
<StartAddress>1 Long Road<EndAddress>
<StartTel>0123 333555<EndTel>
======================
I want to use VBA Access to open the file and import these lines of data
into fields within a table. This text file would come from various users so
would not just be a one off - but on a regular basis (50-250/day)
I have used this forum before and a user very ably helped to show me how to
import - but these were by identifying say Line 1 and importing it, then move
to line 2 and repeat that. My problem is that the first 3 lines as above may
not always be present in these files.
I would like some code/method to look up a line of data and import that.
I also would like to import the text only between the start <> and end <>
eg <StartName>Joe Bloggs<EndName>
the code would look for the start/end <> and would only import the text "Joe
Bloggs" into the UserName field in the table.
Finally, if I have a line called 'False' - can Access import that into a
'Yes/No' field?
Can anyone please offer some help sample code that would allow me to search
in this way?
Thanks for any advice.
======================
UserName: Joe Bloggs
Password: orange1
Register Address: False
<StartName>Joe Bloggs<EndName>
<StartAddress>1 Long Road<EndAddress>
<StartTel>0123 333555<EndTel>
======================
I want to use VBA Access to open the file and import these lines of data
into fields within a table. This text file would come from various users so
would not just be a one off - but on a regular basis (50-250/day)
I have used this forum before and a user very ably helped to show me how to
import - but these were by identifying say Line 1 and importing it, then move
to line 2 and repeat that. My problem is that the first 3 lines as above may
not always be present in these files.
I would like some code/method to look up a line of data and import that.
I also would like to import the text only between the start <> and end <>
eg <StartName>Joe Bloggs<EndName>
the code would look for the start/end <> and would only import the text "Joe
Bloggs" into the UserName field in the table.
Finally, if I have a line called 'False' - can Access import that into a
'Yes/No' field?
Can anyone please offer some help sample code that would allow me to search
in this way?
Thanks for any advice.