×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Data entry problem! Need quick fix!

 Forum Search FAQs Links MVPs

## Data entry problem! Need quick fix!

(OP)

So..does anyone have any ideas about how i can dump the original address into the newly created fields?  The original address is seperated by commars.  So maybe there is a way to runa macro to dump the data across?  Im not sure - its just i dont want to be sat here for the next month copying and pasting the address over to the new fields!

Anyone ?  PLease save me from this torture!!

Matt Pearcey

Replies continue below

### RE: Data entry problem! Need quick fix!

hi,

you could open a recordset over the table, and looping trough it, let's call it rcs_a:

Dim i%, y%, start%
Dim str_adr$Dim str_1$, str_2$, str_3$, str_4\$

do until rcs_a.eof

y = 1
start = 0
next_str:
For i = start To Len(str_adr)
If Mid(str_adr, i, 1) <> "," Then
Select Case y
Case 1
str_1 = str_1 & Mid(str_adr, i, 1)
Case 2
str_2 = str_2 & Mid(str_adr, i, 1)
Case 3
str_2 = str_2 & Mid(str_adr, i, 1)
Case 4
str_2 = str_2 & Mid(str_adr, i, 1)
End Select
Else
start = Mid(str_adr, i + 1, 1)
y = y + 1
GoTo next_str:
End If
Loop

rcs_a.edit
...
rcs_a.update
rcs_a.movenext

loop

i haven't tested it, but i guess it should do the trick

### RE: Data entry problem! Need quick fix!

forgot s.t.

before the loop: initiate

the kid.

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

#### Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!