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
509 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
  • 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 500 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

828 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