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
505 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

785 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