Hi,
I am using Win2000 and Access2000.
I need to build build a macro or write a VBA in Access that would screen all
files contained in a directory on my C drive (files are structrured DAT
files [flat files]) and update an Access table with the following
information:
(1) Filename (variable lenght)
(2) Modified File Date/Time
(3) Value in field 25: (that alphanumeric value is inside the file and is of
variable lenght)
(4) Date in field 62, second subfield (that value is inside the file). The
date is in format YYMMDD. So for instance, for ":62M:C050608EU R16695,64
", I need to capture 05/06/08
A single file might contain several times a combination of field 25 and
field 62. The table should be updated with each combination. I pasted a
sample of the aforementioned flat file below.
Can anyone advice on where to start? Thanks
Pierre
:20:94001051591 92706
:25:00001959026
:28C:112/1
:60F:C050608EUR 0,
:61:0506080608C R18,18NTRFNONRE F//9991912629
/BAI/195/INCOMING WIRE
:86:/PT/DE/EI/JOHN SMITH GMBH, 1010 WIEN IHR KT 0000012345/20000
12345 NR.1234 /22.04.05/NETTOBTR. xx,xx
:61:0506080608C R34,92NTRFNONRE F//9991912631
/BAI/195/INCOMING WIRE
:86:/PT/DE/EI/JOHN SMITH GMBH, 1010 WIEN IHR KT 0000012345/20000
12345 NR.1234 /22.04.05/NETTOBTR. xx,xx
:61:0506080608C R240,95NTRFNONR EF//9991912633
/BAI/195/INCOMING WIRE
:86:/PT/DE/EI/JOHN SMITH GMBH, 1010 WIEN IHR KT 0000012345/20000
12345 NR.1234 /22.04.05/NETTOBTR. xx,xx
:61:0506080608C R261,90NTRFNONR EF//9991912635
/BAI/195/INCOMING WIRE
:86:/PT/DE/EI/JOHN SMITH GMBH, 1010 WIEN IHR KT 0000012345/20000
12345 NR.1234 /22.04.05/NETTOBTR. xx,xx
:61:0506080608C R357,60NTRFNONR EF//9991912637
/BAI/195/INCOMING WIRE
:86:/PT/DE/EI/JOHN DOE 1234567
:61:0506080608C R408,NTRFNONREF//9991912639
/BAI/195/INCOMING WIRE
:86:/PT/DE/EI/JOHN SMITH GMBH, 1010 WIEN IHR KT 0000012345/20000
12345 NR.1234 /22.04.05/NETTOBTR. xx,xx
:61:0506080608C R1127,92NTRFNON REF//9991912641
/BAI/195/INCOMING WIRE
:86:/PT/DE/EI/JOHN SMITH GMBH, 1010 WIEN IHR KT 0000012345/20000
12345 NR.1234 /22.04.05/NETTOBTR. xx,xx
:61:0506080608C R14246,17NTRFNO NREF//9991912643
/BAI/195/INCOMING WIRE
:86:/PT/DE/EI/JOHN SMITH GMBH, 1010 WIEN IHR KT 0000012345/20000
12345 NR.1234 /22.04.05/NETTOBTR. xx,xx
:62M:C050608EUR 16695,64
:86:/PG/1
:20:94002051591 92706
:25:00001959026
:28C:112/2
:60M:C050608EUR 16695,64
:61:0506080608D R16695,64NMSC49 0 0001234567//3377752425
/BAI/577/ZBA DEBIT
:86:/PT/DE/EI/123 1234567891
:62F:C050608EUR 0,
:64:C050608EUR0 ,
:86:/PG/2L
: 1 4464
(1) Filename (variable lenght)
Look up help in Access regarding the FileSearch object With VBA you
can lookup the file names in a directory.
(2) Modified File Date/Time
The LastModified property only allows you to specify a parameter for
filtering.
(3) Value in field 25: (that alphanumeric value is inside the file and
is of
variable lenght)
I'm confused a little here. Is each entry in the file one field?
Based on your sample data, I can't tell.
(4) Date in field 62, second subfield (that value is inside the file).
The
date is in format YYMMDD. So for instance, for ":62M:C050608EU R16695,64
", I need to capture 05/06/08
Again I'm not sure what you mean by subfield. Your explanation might
make sense to you, but I'm confused without seeing the table structure
and the actual data file.
You can do string parsing to strip out the date as long as there is a
common setup for each field. It appears that the comma (,) denotes the
end of the alphanumeric value containing the date you want, so you
could start at the colon behind the number, check for an alpha
character afterwards and then strip out the date using a mid function.
It's very doable, but not easy unless you are good coder.
Sorry I couldn't be more help. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jan van Veldhuizen |
last post by:
The UPDATE table FROM syntax is not supported by Oracle.
I am looking for a syntax that is understood by both Oracle and SqlServer.
Example:
Table1:
id name city city_id
1 john newyork null
|
by: Random Person |
last post by:
Does anyone know how to use VBA to relink tables between two MS Access
databases? We have two databases, one with VBA code and the other with
data tables. The tables are referenced by linked tables in the database
where the code resides. If we move the database with the data tables to
a new directory, the links are no longer valid.
I tried to update the links by changing the Connect property and refreshing:
Set td = db.TableDefs(0)...
|
by: Dom Boyce |
last post by:
Hi
First up, I am using MS Access 2002.
I have a database which records analyst rating changes for a list of
companies on a daily basis. Unfortunately, the database has been set
up (by my predecessor, I hasten to add) so that each day it creates a
copy of the record for each company, changes the date to today's date,
and prompts the user for any changes of ratings on that day. The
resulting data table grows by approx 600 records per...
|
by: Peter Frost |
last post by:
Please help
I don't know if this is possible but what I would really like to do is
to use On Error Goto to capture the code that is being executed when
an error occurs.
Any help would be much appreciated.
Thanks in advance
|
by: Maxi |
last post by:
There is a lotto system which picks 21 numbers every day out of 80
numbers.
I have a table (name:Lotto) with 22 fields (name:Date,P1,P2....P21)
Here is the structure and sample data:
"Date","P1","P2","P3","P4","P5","P6","P7","P8","P9","P10","P11","P12","P13","P14","P15","P16","P17","P18","P19","P20","P21"
1/1/2005,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21
1/2/2005,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22
| |
by: Wayne Smith |
last post by:
I've come up against a major headache that I can't seem to find a solution
for but I'm sure there must be a workaround and I would really be grateful
of any help.
I'm currently building a web site for a small club I belong to and one of
the features I would like to include is the ability to allow users to upload
image files.
unfortunately the servers web root www folder only allows READ and EXECUTE
permissions, which makes it...
|
by: RAMohrmann |
last post by:
Greetings,
I am attempting to view all files in a directory and if those files
have not been modified within the last couple days I will remove them.
In order to do this I need to look at the file date modied and check
the date. I know how to look at each file name and I know how to remove
the file. I just can't figure out how to get access to the date last
modifed filed. Below is how I intend to access the file names in the
directory.
|
by: =?Utf-8?B?QmFidU1hbg==?= |
last post by:
Hi,
I have a GridView and a SqlDataSource controls on a page. The SqlDataSource
object uses stored procedures to do the CRUD operations. The DataSource has
three columns one of which - "Modified" of type DateTime - is hidden since it
should not be edited by a user. The system handles the update for this
column. So, I have hidden (Visible=false) this column on the grid. In order
to access the value in this field, I have created a...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |