iif function

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

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Iif function

Iif function

resolvedResolved · High Priority · Version 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:

Open A Combo Box Automatically

This is helpful if users need to enter large amounts of data. There are two ways to open ComboBoxes when they get the focus by using the tab keys.

When the ComboBox gets focus:

Press Alt + Down Arrow on the keyboard

For it to happen automatically, needs a bit of coding:

1. Add a combo box and a text box control to the form
2. Set the combo box's On Got Focus property to the following event procedure:

Private Sub ComboBoxName _GotFocus()

Me!ComboBoxName.Dropdown

End Sub


3. Open your form in Form View and use the TAB key to make sure it works.

View all Access hints and tips


Server loaded in 0.08 secs.