By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 1,631 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

Conditional Function Within Access Help

P: 2
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
Share this Question
Share on Google+
4 Replies


P: 20
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

P: 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

Expert 100+
P: 296
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

P: 20
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

Post your reply

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