I'm using the following iif statement to compare 2 different rows using the conditional format to change the color to Red if the field is different. I've been using this method on the same report and some fields it works and some fields it doesn't work.
=iif(instr(Fields!Prev_AltAcctTypeB.Value, Fields!After_AltAcctTypeB.Value)>0,"Transparent",'Red")
Is there a different way to display the differences in fields or a trick to correct this? As you can see from this picture below, there's no differences yet it shows the conditional format as being different.
After trying many different ways to make this work.
Remove the Instr and add single prens around each of the fields, and remove the >0. This seems to work great.
=iif((Fields!Prev_AltAcctTypeB.Value) = (Fields!After_AltAcctTypeB.Value),"Transparent",'Red")
Related
I have inherited a product coded using AngularJS and I have a question regarding localization.
There's an HTML section that specifies two input fields of type input-number, one for a number of days and another for a number of months. As part of localizing the product we need to change the order in which the input fields appear, but only for certain languages.
Something like:
English -> Number of days [#Days], number of months [#Months]
Japanese -> Number of months [#Months], number of days [#Days]
What would be a good way of doing this? This is rather straightforward if you want to rearrange text but I haven't been able to find how to rearrange fields. We could have two different HTML sections, one for each of the orderings, but I'm hoping there's a better way to do it.
Answering my own question:
Ended up defining the different fields as separate ng-template items. Then loaded the right input field using ng-include, after parsing the localized string and identifying the input field order.
I have a database of strings containing names mixed with and colour codes (such as §2, §6, §a), for example.
§2joe (joe)
However some colour codes are mixed in the word, for example.
§4ha§6rr§ay (harry)
Lets say I want to select everyone from the database with a name of Harry, regardless of their colour codes.
My current solution is to add % to each letter of the search. For example.
SELECT * FROM people WHERE name LIKE '%h%a%r%r%y%';
This works for names that start with a colour code, but does not seem to always work with names mixed with colour codes.
Is there a better way for me to do the query?
There is probably a better way to store the data.
Split the formatting from the actual data (save two fields). For example. on insert save a "clean" version of the data, along with a
"formatted" version.
There's no reason the wild cards shouldn't work, but they will match more than just "harry." They will also be much slower.
SELECT * FROM people WHERE REPLACE(name,'§a','') LIKE '%h%a%r%r%y%';
Taking out problem color codes may get what you want. That is if you don't have a color code for every letter of the alphabet
Is it possible to somehow combine two <select> tags into one dropdown, preferably in a way which works fine with Bootstrap or the Chosen.js plugins?
I have clients and client groups. In the form I want them to be combined in one dropdown. It should look like "Multiple Select with Groups" in ChosenJS when you use <optgroup> tag.
The problem is that I want different post parameters depending on whether user has selected single client (I need to receive client_id) or client group (I need to receive client_group_id)
So a in trivial case I would make two <select> tags with different name attributes, which are mutually exclusive. But it would look much better if they're combined in one dropdown.
The best thing I can think of is to use <optgroup>, then in each <option> to put something like a data-type attribute, then when user selects something I'll manually fill some hidden input type. Seems okay, but maybe there is a better solution?
I have seen a lot of survey web-pages (among others) that uses checkboxes (multi-selection) as radios (one selection only). The reason they do so is that in their code they have a variable that decides how many selections in one question that can be made. If this is set to 1, it simply limits it to 1 selection instead of using the radio input. I can see the reason for this code-wise. But whenever I see a checkbox I immediately think that I can pick more than one option, however I can not.
Basically my question is:
Shouldn't you, when creating a survey where you use checkboxes to limit the maximum number of pickable options use radios when only one option is pickable?
Yes, you should. But that won't be enough characters to answer the question.
I've been lurking around for years reading up on all sorts of topics. Professionally I'm a Systems Interface Specialist/Interface Architect. I can work wonders with tcl, Cloverleaf, HL7, even Excel, but Microsoft Access eludes me. It repeatedly befuddles and confounds me. Everything that would seem simple and logical to me is neither of those things where MS Access is concerned.
So, I've come to you. Honestly, I'm not even sure I'll be able to put into the correct "technical" words what I want to do. I only know how I want things to appear to function when I'm finished.
I have built a very "simple" relational database to be used by authors who collect sentences or sentence snippets for use/inspiration in writing. There are three tables:
tblPhrases contains an autonumber field idxPhrases and a memo field Phrase.
tblTags contains an autonumber field idxTags and a memo field Tag.
tblTagsToPhrases contains an autonumber field idxTagsToPhrases and two number fields: Tags_index and Phrases_index
The first two tables require that all fields be unique.
Clearly (or not so?), the third table is the many-to-many connection. It allows for there to be many tags associated with a phrase and more than one phrase to be associated with any one tag.
I have figured out how to set up a form and subform but it looks clunky as you can see and it's not at all what I had imagined.
What I really want instead of the dropdown combo box in the keyword/tag subform -- which does populate from tblTags and when I select something, correctly populates tblTagsToPhrases and when I return to that Phrase in the form, displays the list of associated tags...
What I would really like instead is to have the values in tblTags appear in a "Tag Cloud" like on a webpage. Then I can click on the hypertext control for that value and it will populate a text field, adding commas between the selections. However, behind the scenes, it's really just adding to tblTagsToPhrases. I should also be able to type in a new Tag right there. Basically, treating the field like a Tag field on a bookmarking site.
And if I were really honest, I'd like to be able to display the phrases as hypertext too because that would look much less clunky and less like a database.
Can anyone give some direction to get from where I am to there.
Thanks so much in advance for any and all help!
You need VBA to do this, using the Timer event of the form to move labels around randomly, using some detailed maths to get them to move in a direction-of-flow, rather than completely random. Each label (or textbox) would first have to be populated with the field-values. If you only want a static tag-cloud then you wouldn't need the the Timer event.
If you don't know VBA then you'll have to search but I think it unlikely that you will find an example of this (and if you do, will you be able to adapt it?). In fact, if you get this to work, and include the animation, I would expect it to exhibit noticeable flicker.
I think you should ask yourself if you intend to build a database or a web-application. (If you are struggling with Access, why go even further and attempt to make it do things that it wasn't designed for?)