Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String Functions report #Error ??? 1

Status
Not open for further replies.

balin

Technical User
Dec 6, 2002
89
AU
I use these functions all the time Excel, Access etc.
Left, Right, Mid, Len etc.

I was trying to extract from a Text field and all of a sudden useing Mid([text],3,4) gives #Error. I'm inserting this in a query and addressing a known text field in a linked table. Basic stuff but ??

I have this type of function working on fields in other access databases (mdb) No probs. I even tested an older version of the one I'm currently working on - no problems.

Is there some kind of corruption??

JON
 
Forgot to say environment is, Access97 ,Win2000
JON
 
Are you using Mid$() or Mid()?

Mid$ will return error if you reference a NULL field, Mid() will not.
--Jim
 
It has to do with your VB references. I wanted to see if I had the same problem and I could not figure out what was going on. I ran the mid function and got a reference not found error. I set the rerence to Visual Basic For Applications and it works. If it is already checked uncheck it and recheck it with the most current version.
 
This sounds very much like a references issue. Check this link
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Yes guys that was a references issue. I unchecked the reference to the MS DAO library which removed the #Error then rechecked the latest version present on the machine. DAO 3.6.

All is well. Much apreciated. I'm not real good with Code. Most of my work is done with Macros so thanks.

JON
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top