how to separate 12 digits to many fields in access (1 Viewer)

kkahaleh

New member
Local time
Today, 11:41
Joined
Oct 8, 2021
Messages
4
i had tried to find the right code for this, but no use,,, any help
 

Jon

Access World Site Owner
Staff member
Local time
Today, 09:41
Joined
Sep 28, 1999
Messages
7,388
Welcome to the forums! We are the most active Microsoft Access community on the internet by far, with posts going back over 20 years!

To get started, I highly recommend you read the post below. It contains important information for all new users to this forum.

https://www.access-programmers.co.uk/forums/threads/new-member-read-me-first.223250/

We look forward to having you around here, learning stuff and having fun!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:41
Joined
Oct 29, 2018
Messages
21,467
Hi. Welcome to AWF!

Where is the data coming from? If from a text file, this would be easy.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 03:41
Joined
Feb 28, 2001
Messages
27,172
The usual way we solve this is to ask for samples. Give us the inputs that you have and the outputs you would desire. If there are exceptions in the likely inputs or outputs, specify those. Since you didn't actually give us a reason WHY you wanted this or in what context, all we can do is guess. HOWEVER... if your 12 digits are date/time related (yymmddhhnnss format, for example), there might be a few ways to do this that are logically easy to understand without having to parse out text.
 

kkahaleh

New member
Local time
Today, 11:41
Joined
Oct 8, 2021
Messages
4
hey gays.... thanks for the active assist... the data from ms access table in one field name ID_NO with 12 digits, what I want to do to split these numbers into 12 fields in the access form or report
like to assign the first field with the first digit and the second field with the second digit of the 12digits and so on.....
 

Gasman

Enthusiastic Amateur
Local time
Today, 09:41
Joined
Sep 21, 2011
Messages
14,267
Look at Mid() function and a loop 1 to 12
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 01:41
Joined
Aug 30, 2003
Messages
36,125
Welcome to the site. I moved your thread to a more appropriate forum.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 09:41
Joined
Sep 12, 2006
Messages
15,652
Why would each digit of a 12 digit code be relevant individually?
Are the digits really separate flags?
 

Eugene-LS

Registered User.
Local time
Today, 11:41
Joined
Dec 7, 2018
Messages
481
- "...how to separate 12 digits to many fields in access?"
There are many ways ...
How "separate"? - by what rules ?
 

kkahaleh

New member
Local time
Today, 11:41
Joined
Oct 8, 2021
Messages
4
the example is access table with field name idcard and the format is number the data written in it 12digits (000888999111), now I'll create 12 fields in access forms like field1 and field2 ...... field12 ... check the attached
 

Attachments

  • Capture.JPG
    Capture.JPG
    27.3 KB · Views: 68
  • sample.accdb
    480 KB · Views: 59

CJ_London

Super Moderator
Staff member
Local time
Today, 09:41
Joined
Feb 19, 2013
Messages
16,607
rename your fields with relevant names and parse the number - see attached
 

Attachments

  • sample.accdb
    608 KB · Views: 50

Eugene-LS

Registered User.
Local time
Today, 11:41
Joined
Dec 7, 2018
Messages
481
Here you are !
 

Attachments

  • sample_v02.zip
    47.6 KB · Views: 66

Users who are viewing this thread

Top Bottom