[Last Call] Learn how to a build a cloud-first strategyRegister Now



Posted on 2011-04-29
Medium Priority
Last Modified: 2012-05-11
Experts,  the below is not correct.  when I tab out I get an error msg box.  I am not sure if I can use like and IIF.  If so, please let me know where the below is incorrect.  
cboFeetype is a combo with a row source qry.

=iif(([cboFeetype]).column(1) like "*amend*",250,"")
Question by:pdvsa

Accepted Solution

sshah254 earned 1000 total points
ID: 35491986
Use something like

IIf(Instr(1, mydataset, "amend") > 0, 250, "")

LVL 49

Assisted Solution

by:Dale Fye
Dale Fye earned 1000 total points
ID: 35493618
Where are you trying to use this?

=iif(([cboFeetype]).column(1) like "*amend*",250,"")

Is it in the control source of an unbound textbox on a form?  Is cboFeeType a field name, or a control name, I've rarely encountered field names that use control naming conventions?  If it is a control, then the syntax would look something like:

=iif(me.cboFeeType.column(1) Like "*amend*", 250, "")

or you could use INSTR as mentioned by sshah254

=iif(instr(me.cboFeeType.column(1), "amend") <> 0, 250, "")


Author Closing Comment

ID: 35494019
thank you.  the cboFeeType is a the name of FeeType that is a combo box.  it is the control name.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Suggested Courses

826 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question