473,383 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Conditional Function Within Access Help

Hello -

I'm a relatively new user of Access.

None the less, I have a function within Excel that I would like to recreate in Access.

The function called (Check if part of a cell matches specific text) in Excel is below:
=IF(ISNUMBER(SEARCH("v",A2)),"OK", "Not OK")

I have been trying to replicate it in Access with little luck.

Any help would greatly be appreciated, thanks.
Aug 7 '07 #1
4 2028
Hello -

I'm a relatively new user of Access.

None the less, I have a function within Excel that I would like to recreate in Access.

The function called (Check if part of a cell matches specific text) in Excel is below:
=IF(ISNUMBER(SEARCH("v",A2)),"OK", "Not OK")

I have been trying to replicate it in Access with little luck.

Any help would greatly be appreciated, thanks.

I think this might work for you

Expand|Select|Wrap|Line Numbers
  1. iif(like "*v*", "OK", "Not OK")
It checks to see if the data has a v in it, if it does it says OK, if not it says Not OK.
Aug 7 '07 #2
Hello -

Super thanks for the quick response.

I know that in Excel I need to put in a reference cell, how do I do that in Access?

I want it to look within a certain field within a certain table and if it sees something that contains "v", then return "OK, if not then return "Not OK".

Thanks again.
Aug 7 '07 #3
mlcampeau
296 Expert 100+
Hello -

Super thanks for the quick response.

I know that in Excel I need to put in a reference cell, how do I do that in Access?

I want it to look within a certain field within a certain table and if it sees something that contains "v", then return "OK, if not then return "Not OK".

Thanks again.
Create a query and select the field that you are wanting to check.
Expand|Select|Wrap|Line Numbers
  1. SELECT iif([Field1] like "*v*", "OK", "Not OK") AS chkForV
  2. FROM Table1;
Replace [Field1] and Table1 with your field and table names and you can use any Alias (doesn't have to be chkForV)
Aug 7 '07 #4
Create a query and select the field that you are wanting to check.
Expand|Select|Wrap|Line Numbers
  1. SELECT iif([Field1] like "*v*", "OK", "Not OK") AS chkForV
  2. FROM Table1;
Replace [Field1] and Table1 with your field and table names and you can use any Alias (doesn't have to be chkForV)
That would work, though he is new to access, and it wouldn't show any other fields they may want. Just put
chkForV: iif([Field1] like "*v*", "OK", "Not OK")
as one of your columns in a new query of your table, then put whatever information you want in the other columns. Again, like mlcampeau said
Replace [Field1] and Table1 with your field and table names and you can use any Alias (doesn't have to be chkForV)
Aug 7 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
13
by: Andrew | last post by:
I use conditional compiler constants, set through the VBA IDE in Tools, <projectname> Properties, that I refer to throughout my code to control which code is used during development, and which...
3
by: Chuck Reed | last post by:
I am working on a sales report where I show weekly sales by category for each of the 52 weeks in the year. Each record in my table/report has the 52 weeks of sales in it. I want to highlight to top...
1
by: ammarton | last post by:
Hello all...I'm a bit new to working with Macros in Access so forgive me if the terminology I use is not accurate. To preface this, basically I am using a form on a replicated database so the...
1
by: GGerard | last post by:
Hello Is there a way to use a variable in the Conditional Formatting of a Textbox? Example : I want the background of a textbox in a continuous form to change color when the value of...
1
by: Martin Schneider | last post by:
Hi! I have an unbound text field conditionally formatted: =DomWert("";"ActiveLines") (DomWert is the german translation for domain value) (to check whether the currend record is within...
16
by: Alan Jones | last post by:
Hello everyone, any help would be greatly appreciated. :) What I'm trying to do may not be advisable, but here goes... I want a page named signature.php to appear conditionally as an include...
3
by: Steve Antrobus | last post by:
Hello all, I've seen many discussions regarding continuous forms in Access and how to highlight individual rows and they all seem to suggest conditional formatting as the only way. This is...
1
by: Brian | last post by:
I have an ASP.NET page that uses a FormView and SqlDataSource. Within my page I want to change a string if a column within my database record is a certain value. Here is some sample code: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.