Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

iif function

ResolvedVersion 2000

Gary has attended:
Access VBA course
Excel VBA Advanced course

Iif function

Good afternoon

I require an Iif function created in a query, so it will probably be SQL specific. The function needs to relate to a lookup table where the value is equal to that of two fields.

Because I record the Officer's collar number in my database the lookup table has independant values but when you reference it against the main table you cannot create a relationship as obviously this would create duplicates. Is there a function/expression that we can write that you reference the two fields with the collar number and if that collar number matches, then references another field with the force unit description. It ideally needs to be placed into a query as the data will be imported on a regular basis. And, I want it to auto workout the details from the query.

So, this is how I want it to work:

Iif ([Officer] = [txtOfficerNumber], Show [txtOfficerUnit], "Unknown"]

Is there a more productive way to action this query. Hope you can help?

Gary

RE: Iif function

Good morning Gary

After reviewing your post we are confident we can reach a solution however it is beyond the scope of this forum.

We will need to review your working files and estimate the amount of work required (e.g 1-3 hours) to create the solution.

As this will involve development time there will be associated costs which we will let you know about before commencing any work.

If you wish to discuss this further please contact us.

Kind regards

Jacob

Wed 7 Apr 2010: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Access tip:

Closing form after a certain time period

To make a form close automatically after a certain time period, you need to assign the close function to a macro.

Save the macro and ope up the form in design view. open the Properties sheet.

In the TimerInterval property enter the length of time you want the form open for. This should be in milliseconds, so for instance if you want the form open for 5 seconds enter 5000, for an minute enter 60000.

You now need to attach your macro (to execute the Close action) to the OnTimer event property of the form.



View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.