By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,401 Members | 928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,401 IT Pros & Developers. It's quick & easy.

Split information in fields

P: n/a
In my accesstable i have one field with two numbers separated by a slash
(i.e. 753/999).
I want to store the number before the slash (could be between 1 and 10
digits) in a field called "F1" and the number after the slash (could be
between 1 and 10 digits) in another field called "F2".
I have tried with right, left and len functions but I cannot make it work
the way I want.
If somebody could help me with some code to make this work I would be most
greatfull.
Best regards
Orjan
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Fri, 04 Jun 2004 10:28:16 GMT, Orjan wrote:
In my accesstable i have one field with two numbers separated by a slash
(i.e. 753/999).
I want to store the number before the slash (could be between 1 and 10
digits) in a field called "F1" and the number after the slash (could be
between 1 and 10 digits) in another field called "F2".
I have tried with right, left and len functions but I cannot make it work
the way I want.
If somebody could help me with some code to make this work I would be most
greatfull.
Best regards
Orjan


Create an Update Query.
Update YourTable Set YourTable.F1 =
Left([FieldName],InStr([FieldName],"/")-1),
YourTable.F2 = Mid([FieldName],InStr([FieldName],"/")+1)
Where YourTable.[FieldName] is not null;

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2

P: n/a
F1 = Left([CombinedField],InStr([CombinedField],"/") - 1)
F2 = Mid([CombinedField],InStr([CombinedField],"/") + 1)

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Orjan" <or************@sparay.se> wrote in message
news:49********************@newsc.telia.net...
In my accesstable i have one field with two numbers separated by a slash
(i.e. 753/999).
I want to store the number before the slash (could be between 1 and 10
digits) in a field called "F1" and the number after the slash (could be
between 1 and 10 digits) in another field called "F2".
I have tried with right, left and len functions but I cannot make it work
the way I want.
If somebody could help me with some code to make this work I would be most
greatfull.
Best regards
Orjan

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.