Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 30th, 2003, 07:22 AM
Authorized User
 
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default InStr() in Access 2000

Wonder if anyone can help? I want to update a field in a table with the position of a character from one of the other fields. In Access 97 I would have written something like:

InStr(Trim([Employee]),")")

Although I've never previously tried in in an Update Query I would have thought it would have worked. Having tried this in Access 2000 it doesn't work ("Can't update records..."). The field is set to Number not text.

I've searched through the help files but am none the wiser, however both Mid(Trim[Employee],4,4) and Left(Trim[Employee],4) work

Regards

Russ (Programing on L plates..!)
__________________
Regards

Russ (Programing on L plates..!)
 
Old July 8th, 2003, 05:42 AM
Authorized User
 
Join Date: Jul 2003
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alex_read
Default

Try one of the following & post a reply to say whether these have worked or if the issue's still outstanding please:

InStr(cstr(Trim(cstr([Employee]))),")")

InStr(Trim([Employee]),")",0)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle Instr ermutigen BOOK: SQL Functions Programmer's Reference 1 May 31st, 2009 12:04 AM
SQL SERVER 2000 AND ACCESS 2000 ckentebe SQL Server 2000 3 June 17th, 2004 08:50 PM
ADE file in Access 2000 <---> Access XP ginoitalo Access 3 April 14th, 2004 09:06 PM
Migrating from access 97 to access 2000 Khalifeh Access 12 October 2nd, 2003 02:54 PM
Access XP VBA compatibility issues w/ Access 2000 bourgeois02 Access VBA 1 August 19th, 2003 04:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.