?
Solved

Using the Split function in a query keep getting error Invalid dot or ! operator but those operators arent there.

Posted on 2013-11-26
5
Medium Priority
?
528 Views
Last Modified: 2013-11-26
I have data in a field that I need to append but I only want to append part of the field. When I try to append the field I get a error invalid dot or ! operator or invalid parentheses. The data in the field is 57K66740245.
Im trying to delete the rest of the string 0245 and just leave this "57K6674".Example
Split("57K6674", "0")(1)
Barcode.accdb
0
Comment
Question by:gigifarrow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39678069
Split() function does not work in a query..


you need to create a function in a regular module to do the splitting


try this format

Field : Left([Data],Instr([Data],"0")-1)
table

Append to PartNumber
0
 

Author Comment

by:gigifarrow
ID: 39678101
Thank you for your help. Are you saying to try this for my query or to put this in a module.

When I try it in a query I get datatype Mismatch. Left([57K6674],InStr([57K6674],"0")-1)


How would I make a module to append the query with this criteria?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39678161
check this, see query1
Barcode.accdb
0
 

Author Comment

by:gigifarrow
ID: 39678472
Excellent! Thankyou

How would I do it to separate in three places?


57K66740245999

Part          Serial   Cage
57K6674  0245     999
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 39678558
If the information in the [data] field is of the same number of characters

Field: right([Data],3)


Append To Cage
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question