In Microsoft Access , the InStr function is a powerful tool that returns the position of the first occurrence of one string within another. This function is particularly useful when working with text strings in your database, allowing you to locate specific characters or phrases with ease. For example, if you had a string value of "this is a sentence" and needed to find the first occurrence of a space, you could use the InStr function like this:
Example:
Dim sValue As String
sValue = InStr(1, "this is a sentence", " ")
In this example, sValue would contain a numeric value of 5, as that is the position of the first space in the string.
The InStr function becomes even more powerful when combined with custom functions. Below, we explore three versatile examples:
Function 1: This function allows you to pass a string and a search term. It returns all the characters up to the first occurrence of the search term. This is ideal for extracting substrings to the left of a specific point.
Function 2: Similar to the first, but instead of returning the left portion of the string, it returns everything to the right or after the search term is found. This is useful for isolating text that appears after a delimiter.
Function 3: This function identifies the exact position of the search term and even allows you to specify which occurrence to locate. For instance, in the string "ab ab ab ab djfkd ab dfjkd," you can find the position of the fourth occurrence of "ab" by calling:
sFindByOccurrence("ab ab ab ab djfkd ab dfjkd", "ab", 4)
The result would be 10 , as the fourth "ab" starts at position 10. This flexibility makes the InStr function invaluable for text parsing and string manipulation in Microsoft Access.
If you’re looking for advanced string handling or need help implementing custom functions to optimize your database, don’t hesitate to Contact Us . Our team can help tailor solutions to your unique needs.
The Microsoft Access InStr Database is a sample database that shows you how to implement the InStr inside your own Access Database.
Please note that this is a template database. If it does not meet your needs 100%, and you are unable to customize it yourself, let WSI know and we will provide a quote to develop the customizations you need to get you exactly what you want in your Access InStr Database System.
Sample Screens
Main Menu
Main Form - Form Criteria
Main Menu Form
Main Menu - Modern Look (Access 2010/2013)
Previous
Next
Download a Demonstration
Are you having problems getting the code to work for you? If so, then try out the demo to see how it can work for you.
Download a demo version for free to test!. The demo version is in Access 2007, which will work on either Access 2007, 2010, 2013, 2016, 2019 or Office 365. If you need a previous version of Access to try, please
Contact Us . Please note that the demo version of the software is fully functional but does not allow you to see the code implementation. The full version allows you to design the code implementation and adjust it for your needs.
Access 2007 Download
Access 2010/2013/2016/2019/Office 365 Download
Access 2010 64 Bit Download
Access 2013/2016/2019/Office 365 64 Bit Download
Full Version and Live Demonstration Options
Live demonstration
To experience a more interactive and personalized demonstration of this WSI template, we invite you to contact WSI and schedule a live demonstration with one of our team members. This opportunity allows you to engage directly with us, either as an alternative to or in conjunction with downloading and exploring the demo version of the template at your leisure.
Please note that downloading Microsoft Office files, including Microsoft Access database files, might trigger a security warning on your computer. To avoid this and get a comprehensive overview, you have the option of viewing the template through a virtual meeting on Teams or Zoom with a WSI representative.
After purchase
Once you purchase the database template, you will receive the full version of the database in a standard Access Database file. The purchased database will have full access to the database window, all design objects, the Visual Basic project code, and you will be able to modify or add to the design in any way you wish. This does not apply to run-time or compiled versions.
If you lack the time to integrate this database into your system, please Contact Us and we will be glad to help with your integration process. If you like the basics of what you see in the database, but need enhancements to make the system functional for your business, please Contact Us and we will develop a quote for the additional features you require.
Purchase Price
$9.99 - this allows you to use this database template however you wish within your organization.
$19.99 for unlimited developer use - this allows you to use this database template however you wish for any applications you develop and distribute.
After Your Purchase
Delivery timing
Once your purchase is complete, you will receive an email within 12 hours, and usually sooner during standard business hours, with a link to download the full version of the database. Please check your junk mail folder if you do not see the message.
Implementation help
If you need help implementing this function or need modifications for your requirements, request a free quote for your Microsoft Access development needs. WSI will determine your needs based on written requirements that you provide. Please ask your WSI representative for an example of sufficient written requirements.
Support and customization
WSI offers optional paid support and customization programming services. WSI templates are priced based on the purchaser self-supporting the database. WSI assumes purchasers who do not wish to pay WSI for support have the Microsoft Access and SQL Server knowledge needed to install, customize, and use the template. Paid support is available by the hour; please contact us for the current hourly fee.
Planning your changes
If you need assistance preparing requirements, WSI offers fee-based services to help document what needs to be done. You can also review our process mapping service or learn more about the WSI quoting process .
Testimonials
What Customers Say About WSI
"Once again, you guys have outdone yourself. The service and support you have provided has been the best I've ever experienced from a software development team. You guys have the best Access calendar GUI I've ever seen."
Mike Mattas New-Tech Systems Plainfield, IL
"Thanks to all!! Nice job on the changes. They look good, thanks for your quick response!!"
George Ells Tulip Systems, Inc. Pittsburgh, PA
"Thanks for all your help. Your service is great as I find you and your team easy to deal with and very responsive in terms of getting the changes done. Great work."
Steve Da Silva Manager, Customer SupportThe Hospital for Sick Children Toronto, Ontario, Canada
"With the expertise of Andres the database was put in the store for use just 4 days later. The efficiency of his programming and the added benefit of video to refer back to in case of small adjustments brought what seemed like a daunting task into reality very quickly."
Debbie Hunt Controller Glendon Bald Eagle Holdings Ltd. British Columbia, Canada
"Bottom Line: Winning Solutions is hands down the most polite, professional, committed, able, and proven company I have ever worked with. Their staff, top to bottom, are all winners."
Dave YeadonDakota Steel & Trim Canton, SD
"Our Service Dept is enjoying the Calendar. We adapted the Enhanced Microsoft Access Calendar to meet our needs. The Service Manager and Advisors enjoy the ease of booking work."
Richard "Dick" MillikenWhited Peterbilt Bangor, Maine