I sometimes have 20 or more values within in a single check box. It is then not easy to see which value is checked. Has anyone an idea how I can improve the readability? Maybe through a special formatting? I want either the cross to be better visible, or the text behind the very cross to be marked, somehow.!
FileMaker Checkbox - checked values not recognizable
You could put a edit box version of the field (I'll call it MyTable::MyOptions) next to the checkbox and remove the ability to edit the field in browse mode. That way, each time a user checks or unchecks a value, the edit box version of the field would show each unique value selected.
Aside from that, you could also consider changing the field that holds the checkbox to a portal that points to a "Checkbox Options" table that holds all of the possible options. You could put a button on each portal row that runs a script "add/remove option" that
Takes the value from the currently clicked portal row
Compares it to your field that you used to have your check box on to see if the value exists or not:
PatternCount ( ¶ & MyTable::MyOptions & ¶ ; ¶ & $selectedValue & ¶ ) > 0
If the value does exist already (the pattern count returns true) then you could remove the value from the list:
Substitute ( ¶ & MyTable::MyOptions & ¶ ; ¶ & $selectedValue & ¶ ; ¶ )
If the value does not exist, you could append it to the field:
Set Field [MyTable::MyOptions ; MyTable::MyOptions & ¶ & $selectedValue]
This would allow you to add conditional formatting to the button on each portal row to change color if the value the row holds is in the field containing all of your options.
Related
I have a table like this one :
This table represents a species (No = 3) and the number of individual for the last 6 years. (FYI, the table cannot be displayed differently.)
I created a Combo Box which displays the last 6 years (based on a field list).
What I have to do so that the turquoise rectangular automatically displays "31", for example, if the year "2014" is selected?
The question doesn't contain enough detail about the host form and other bound controls, so the following is just a pattern to follow.
Set the Control Source of the turquoise (i.e. cyan) control to something like
= DLookup("[" & comboboxYear.Value & "]", "TableName", "ELEMENT_ID=" & [ELEMENT_ID])
This assumes that there is a bound control named [ELEMENT_ID] on the form. Brackets wrap the ComboBox value to ensure the value is interpreted as a column name and not a number.
I am looking for a way to set a checkbox field to checked via a mail merge. I would like to avoid using a macro if possible. The document I was provided has a check box form field with a bookmark named "SUBMIT". Is there a way to pass in data (CSV file) that will cause the checkbox to be checked? Perhaps a data field named SUBMIT whose value is true, etc?
If that is not doable, I was considering just passing an "X" or some character that represents a check mark and overlaying the field.
Yes, this should be doable using field codes. You can have an IF field display a font symbol or a graphic for True / False based on the content of a field in the mail merge data source.
For the sake of discussion, let's say the field name in the data source is "Submit". Insert a pair of field brackets by pressing Ctrl+F9 and create the IF field structure, inserting the MergeField from the mergefield list:
{ IF { MergeField "Submit" } = 0 "" "" }
Note that I'm checking for "false" because this value is predictably 0, while True might be 1 or -1.
Now position the cursor between the first pair of double-quotes and insert the "not checked" graphic or symbol. For example, you could use Word's Insert/Symbol dialog box to insert a WingDings box. Repeat for the "checked" box, using a checked symbol or graphic.
Alt+F9 to toggle the field codes back to display and test.
How do I get a smart numbering system as shown below? Whenever I have a new table, I want the numbering to rise.
If, on the other hand, I add a row to the table, I would like to add a letter in behind the numbering.
Is this possible?
I have startet using Field Codes and Sequences, and I believe it is the way to go.
I know the numbering without the letters can be obtained by
Number #{ STYLEREF 1\s}{SEQ Table \# "00"}
I also know that alphabetic numbering can be made by using the \alphabetic command.
I am just not sure how to combine them. Also, I would like to make cross-references to the table captions.
You can achieve this with Word's built-in numbering - no need to resort to a complex combination of fields that you'll need to manually update.
I'm going to outline the very complete approach...
On the Home tab: Paragraph/Multilevel list/Define new list style.
Enter a name for the style, then from the Format button choose Numbering; click More.
With Level 1 selected, choose the style with which you want to link the numbering (Heading 1, for example)
In the "Enter formatting for number" field type any text you want to have appear before or after every number. (According to your picture: Header in front of the number 1 with grey shading already in the box.)
Select Level 2, choose the style with which you want to link the numbering (Heading 2, for example)
In the "Enter formatting for number" field type in front of the number (2, grey shading): Number #00
From the "Include level number from" dropdown, select level 1. The number from Level 1 will be inserted between the last 0 and the grey-shaded 2.
If necessary, change the alignment settings (you probably don't want the indent inside the table cell?)
Now, when you apply the Heading styles the numbering will be applied automatically. If you don't like the formatting of the Heading styles you can change the style definition(s). Since you created a numbering style, you can also change these settings by going again to the Multilevel numbering dialog box, right-clicking the numbering format you created and selecting "Modify".
I believe the following field code approach will give you the numbering indicated in your sample image (where the table numbering restarts for each Heading 1 paragraph. However, it will probably only work for "in-line" tables, not floating tables or tables in text boxes and so on.
The main aim here is to ensure can insert exactly the same field codes for each new "Number#" that you need, but to achieve that you also have to put some codes at the beginning and end of each table. You will also need to select and re-execute all the field codes twice to ensure that they are updated properly - this is the kind of disadvantage that Cindy Meister's Answer mentions.
At or before the beginning of each table, put the following fields. (If you are already putting a table caption before each table, you could do this slightly differently.)
{ SEQ tbl \s 1 \h }{ SEQ ltr \r0 \h }
This increments the table number, resetting at each Heading 1 paragraph, and resets the letter number to 0.
For every "Number #" you want in a table, use the following fields:
Number #{ STYLEREF 1 \s }{ SEQ tbl \c #00 }{ SEQ ltr \h }{ IF { REF "chap{ STYLEREF 1 \s }tbl{ SEQ tbl \c }" } > 1 "{ SEQ ltr \c \*alphabetic }" "" }
This inserts the appropriate Heading number and the table number, and increments the letter number. It then looks at a bookmark that contains the number of "Number #" entries in this table. For example, if Heading 1 is numbered 4, and this is the thrid table under that heading, the bookmark will be called "chap1tbl4". If the bookmark's value is greater than 1, the appropriate letter will be appended.
But we have to create that bookmark and value, which we can only do after all the "Number #" fields for that table. So at the end of each table, or immediately after the table and before any new Heading 1 paragraph, you will need the following field codes:
{ SET "chap{ STYLEREF 1 \s }tbl{ SEQ tbl \c }" { SEQ ltr \c } }
The thing is that Word evaluates field codes in the sequence they appear in the document. So when Word first encounters the { REF } field in the table, the bookmark will have no value. So the first time you select all the fields and execute them, you may see the wrong answer. After you have done that, the bookmark is created. Word will use the value most recently assigned to the bookmark, so the next time you execute the "Number #" fields, they should work properly.
I think to achieve what you wanted using the general approach given in Cindy Meister's Answer, you would need to have two separate Heading levels, one for the Numbers without letters,and another for the numbers with letters. The user, or some VBA (say) would then have to decide for each table which Heading level to use. But even if that is the case (and she may have something else in mind), it may still be an operationally simpler approach than the field-based one. I suspect only you are in a position to decide.
There may be a simpler field-based formulation, but IME the basic problem is that you cannot test the "final value" of a SEQ or SET field, only the value it has at the point of execution. For example, if there was a \f flag that let you test the final value of a SEQ field, you could use
{ IF { SEQ "chap{ STYLEREF 1 \s }tbl{ SEQ tbl \c }" \f } > 1 .... }
to test the number of "Number #" entries in each table, without having to have that awkward end-of-table SET field.
Is there way to use conditional formatting (similar to excel) to a text box in an ms access form? The user will enter a number in the text box. If the number is between 0-25 is red, if its from 26-50 its yellow, if its from 51-75 than green and 76-100 blue.
How can this be done in MS Access?
?
Note as #Nexus mentioned below, the FormatConditions collection will only accept 3 conditions. But you were aiming for 4 conditions. Unless you can consolidate those into only 3, you won't be able to use Access' conditional formatting feature for this.
With the form in Design View, right-click the text box and choose "Conditional Formatting ..." from the context menu.
Select "Field Value Is" from the drop-down under Condition 1, "between" in the second drop-down, and enter your start (0) and end (25) range values in the next 2 boxes. Choose red from the Font/Fore Color drop-down.
Click the "Add >>" button to add another condition (Condition 2). Set the values for that condition: 26; 50; and yellow.
Repeat for the remaining conditions.
Here's a screen capture of your first 2 conditions applied to a text box. (I chose light grey for the background color so the foreground colors would be more distinct in format preview area.)
I have a Word document with fields of the reference variety, which occur in the form "[field].[field]"--in other words, there's a period between the two fields. I want to globally replace this with a space.
Word offers the ^d special character to search for fields, but for some reason the query "^d.^d" does not find anything. However, ".^d" does. Now comes the problem, however--what do I specify as the replacement text in order to retain the field code? If using regular expressions, I could use a "Find What Expression" such as \1, but with regexp ("wild card") mode the ^d is not permitted.
I guess I could write a macro...
I would like to add to Bibadia's solution.
An example of an index entry field; we want to change a name we misspelled.
Make sure hidden formatting is displayed (toggle with SHIFT+CTRL+F8).
Make sure wildcards option is not selected. To search for fields, use the opening and closing field braces code (optionally use ^w for spaces, as Bibadia suggested):^19 XE "Deo, John" ^21
Replace won't recognize field braces character, but will allow to insert the clipboard's content. ;). To do that, insert in text the correct entry. CTRL+F9 to insert field and type:XE "Doe, John"
Select the field above and copy
Use ^c in the replace box
Hit Replace All
Ta-da!
It's usually better to go the macro route when finding fields because, as you say, the find algorithm that Word uses doesn't work the way you might hope with fields.
But if you know exactly what the fields contain, you can specify a search pattern that will probably work (however not in wildcard mode).
For example, if you want to look for figure number field pairs such as
{ STYLEREF 1 \s }.{ SEQ Figure \* ARABIC \s 1 }
(which would typically be the same set of fields everywhere in the document)
If you only really need to look for the following:
{ STYLEREF 1 \s }.<any field>
you could ensure that field codes are displayed and search for
^d STYLEREF 1 \s ^21.^d
or
^19 STYLEREF 1 \s ^21.^19
If you need to be more precise, you can spell out the second field as well.
"^d" only works for finding the field beginning, not the field end.
It's a shame that ^w wants to find at least 1 whitespace character because otherwise it would be more robust to look for
^19^wSTYLEREF^w1^w\s^w^21.^19
Perhaps someone else knows how to work around that without using wildcards?
Torzaburo,
I suggest that you do this using a macro. You can start by recording the macro, and later refining your processing steps within the macro.
First turn on the hidden characters by navigating to Home > Paragraph > toggle the show/hide Paragraph symbol. Also, select all and toggle the field codes on (right-click and select "Toggle Field Codes".
Open a new blank Word doc in addition to the one you have open. You will use this later. Start the macro recording and find the field using the "^d" (field code) as you said.
When the field is found, copy only the field text within the brackets, and not the full field reference. While the macro is still recording, ALT + TAB to the new blank document and paste the field code in as plain text.
At this point, do the necessary find & replace processing to the field codes. Highlight the processed field codes, copy, ALT + TAB back to the original document, and paste back between the { } brackets.
Stop the macro recording. Add any further custom processing to the macro VBA.
Select-All and re-toggle the field codes. Update the field codes.
You don't need a macro. Just toggle all field codes on by using Alt+F9. Then do a find and replace for what you want to change. Once the replacement is complete, use Alt+F9 again to toggle the field codes back off.
Disclaimer: I didn't originate this solution, but it's clean and elegant and I thought it should be included here:
(Adapted from Search & Replace Field Codes in Word):
Create or find a single instance of the field you want to convert text to
Toggle Field Codes visible (AltF9)
Copy the code for the field you want to use to the Clipboard (highlight and CtrlC)
Open the Replace dialog box (CtrlH), insert the text you want to replace in the Find What box and then enter ^c in the Replace With box.
This will replace your text with the contents of the Clipboard, turning it into the field code you copied in step 3. It also copies formatting information (font, color, etc.), to control how the field will appear when hidden. (Caveat: I've tested this with Word 2003 under Windows 7 only.)
Coming in late on this, probably way too late for Beth (sorry Beth). And this may not be quite what Beth was looking for. But for anyone interested ...
It sounds like Beth may have created captions throughout the document using INSERT CAPTION (hence the presence of field codes). This means these captions will have been (automatically) created in CAPTION style.
To globally replace the separator "." with " " (space) in such captions, take two steps:
[1] Go to REFERENCES | INSERT CAPTION, then click on NUMBERING and replace the SEPARATOR "." with "EM-DASH". This will replace all separators in captions for the selected label in the CAPTION Window. If you have other labels in use in the document (e.g. FIGURE), select the other labels one by one and repeat this process.
[2] Do a find/replace searching for special character "em-dash" (^+) in style CAPTION, replacing with " ". Click REPLACE ALL.
Voila!
NOTE: This presumes that em-dash does not appear in the caption text anywhere. If it does, then you'll need to do a pre- and post- "fiddle" to ensure these em-dashes are not touched by the global replace above.
The "pre-fiddle" is to do a global find/replace across captions, replacing the em-dash ("^+") with some other string (e.g. "EM-DASH") that doesn't ever occur in any caption's text. Then you do the separator change as described above. Finally, the "post-fiddle" is to restore the em-dashes that were in the captions, by doing a global replace of the string "EM-DASH" with the actual em-dash character "^+".