Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / March 2007

Tip: Looking for answers? Try searching our database.

What Access function would = the folllowing from Excel:  =MID(H31,1,FIND(",",H31)+5)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ben - 29 Mar 2007 19:17 GMT
Access does not seem to have FIND function.  I need to capture Last
Name + Comma + First 4 Characters of First name.  In the Mid function
since last names are variable length, I need to determine the location
of the comma within the field, then capture from 1 to Comma plus 5
characters.

This works in Excel, and I updated Access to read as follows:

=MID([Name],1,FIND(",",[Name])+5)

Access does not like FIND though
George Nicholson - 29 Mar 2007 19:30 GMT
=Mid([Name],1,Instr(1,[Name],",")+5)

> Access does not seem to have FIND function.  I need to capture Last
> Name + Comma + First 4 Characters of First name.  In the Mid function
[quoted text clipped - 7 lines]
>
> Access does not like FIND though
Jerry Whittle - 29 Mar 2007 19:32 GMT
In Access it's Instr().

Debug.Print Left("Whittle, Jerry",Instr("Whittle, Jerry",",")+ 5)
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> Access does not seem to have FIND function.  I need to capture Last
> Name + Comma + First 4 Characters of First name.  In the Mid function
[quoted text clipped - 7 lines]
>
> Access does not like FIND though
Bill Edwards - 29 Mar 2007 19:34 GMT
=left([Name], instr(1,[Name],",") + 5)

By the way it is bad practise to name a field or variable NAME
It is also bad practise to have a field that contains both lastname and
firstname

> Access does not seem to have FIND function.  I need to capture Last
> Name + Comma + First 4 Characters of First name.  In the Mid function
[quoted text clipped - 7 lines]
>
> Access does not like FIND though
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.