jeremie_ingram
Registered User.
- Local time
- Today, 07:12
- Joined
- Jan 30, 2003
- Messages
- 437
Heres a bit of a stickler that I have come across. I am exporting data from and antiquated database into a Tab Delimited file. From the file I import the data to Access, no problem so far...
Now within the file there are 3 fileds (Field1, Field2, Field3 for discussion). Field1 contains a type of unique record number, the other two fields contain text related to the Field1 value. The problem is that the additional records related to first Field1 value have no entry in Field1. This is from a flat file type database, so I can identify the the records only by order they are brought in. I need to add the Field1 value to all of the following records containing a blank Field1. When it comes across the next record containing a Field1 that is not Null, then it will not make any changes, and add that value to the following records that have a blank Field1
In addition, I need to have this action carried out in a manner that can be processed automatically by the database (module or query).
In my quest to get figured out, I had attempted creating modules that run a loop to look at and modify the records, but none have worked (VBA is not my strongest point yet). To make these attempts easier, I have added 2 additional fields - Field0 (autonumber) and Field4 (yes/no). I have ran an append query so that all records with a Field1 = Null are also showing True in the yes no field. I have added this for later use to easily identify the related records on sight.
One item that I have found usefull, THERE WILL ALWAYS BE A VALUE IN THE FIRST RECORDS FIELD1.
An example of what this would look like as table data
Field1*****Field2*****Field3*****Field4
00001*****33333****Jack******Smith
00002**************Barb******Smith
00003**************Greg******Smith
00004*****44444****Jhon*******Doe
00005*****55555****Jane******Thomas
00006*****66666****William****Jones
00007**************Janet******Jones
Any suggestions?
Now within the file there are 3 fileds (Field1, Field2, Field3 for discussion). Field1 contains a type of unique record number, the other two fields contain text related to the Field1 value. The problem is that the additional records related to first Field1 value have no entry in Field1. This is from a flat file type database, so I can identify the the records only by order they are brought in. I need to add the Field1 value to all of the following records containing a blank Field1. When it comes across the next record containing a Field1 that is not Null, then it will not make any changes, and add that value to the following records that have a blank Field1
In addition, I need to have this action carried out in a manner that can be processed automatically by the database (module or query).
In my quest to get figured out, I had attempted creating modules that run a loop to look at and modify the records, but none have worked (VBA is not my strongest point yet). To make these attempts easier, I have added 2 additional fields - Field0 (autonumber) and Field4 (yes/no). I have ran an append query so that all records with a Field1 = Null are also showing True in the yes no field. I have added this for later use to easily identify the related records on sight.
One item that I have found usefull, THERE WILL ALWAYS BE A VALUE IN THE FIRST RECORDS FIELD1.
An example of what this would look like as table data
Field1*****Field2*****Field3*****Field4
00001*****33333****Jack******Smith
00002**************Barb******Smith
00003**************Greg******Smith
00004*****44444****Jhon*******Doe
00005*****55555****Jane******Thomas
00006*****66666****William****Jones
00007**************Janet******Jones
Any suggestions?