KP_SoCal
Registered User.
- Local time
- Today, 12:30
- Joined
- Dec 4, 2009
- Messages
- 39
This is somewhat complicated. For Table1, each record of text Field1 has string length in multiples of 3 that is no greater than 12 characters and no less than 3 characters.
For instance:
Table1
Record1 = ABC123ABC
Record2 = 123
Record3 = ABC123
Record4 = 123ABC123ABC
In a query (perhaps an Append Query?), I would like to append these records into Table2 by splitting them by multiples of 3 into separate records. Since the maximum amount of characters in a given string is 12 characters, I only need Table2 to have 4 different field names. The results would look something like this.
Table2
Record1
Field1 = ABC; Field2 = 123; Field3 = ABC; Field4 = IsNull
Record2
Field1 = 123; Field2 = IsNull; Field3 = IsNull; Field4 = IsNull
Record3
Field1 = ABC; Field2 = 123; Field3 = IsNull; Field4 = IsNull
Record4
Field1 = 123; Field2 = ABC; Field3 = 123; Field4 = ABC
I’m fairly certain this can only be accomplished with a function created inside of a module that is ran within my query. I’m using Access 2007. Thanks so much for any suggestions!
For instance:
Table1
Record1 = ABC123ABC
Record2 = 123
Record3 = ABC123
Record4 = 123ABC123ABC
In a query (perhaps an Append Query?), I would like to append these records into Table2 by splitting them by multiples of 3 into separate records. Since the maximum amount of characters in a given string is 12 characters, I only need Table2 to have 4 different field names. The results would look something like this.
Table2
Record1
Field1 = ABC; Field2 = 123; Field3 = ABC; Field4 = IsNull
Record2
Field1 = 123; Field2 = IsNull; Field3 = IsNull; Field4 = IsNull
Record3
Field1 = ABC; Field2 = 123; Field3 = IsNull; Field4 = IsNull
Record4
Field1 = 123; Field2 = ABC; Field3 = 123; Field4 = ABC
I’m fairly certain this can only be accomplished with a function created inside of a module that is ran within my query. I’m using Access 2007. Thanks so much for any suggestions!
