it is possible to automate time and date last modified, I have 4 text box, one is for the date have the formula #Created and the 3 have the formula #Modified. i want the 3 text box modified one at a time.
sorry for my English.
If you're looking for Richard's solution try this:
Create a field
put a field on your form,
go to field properties
make the field computed for display
check "Allow multiple values" in the first tab,
then go the the 3rd tab and select in the field "Display separate values with" the value "New Line"
#Formula
Put in the value property of the text field:
#Subset($Revisions; 4)
this will give you the first 4 entries. If you want to get the last 4 entries, put a minus before the number:
#Subset($Revisions; -4)
Is this what you wanted??
Related
In a LibreOffice writer document with a field of #temperature_farenheit. Is there a way to create a field named #temperature_celcius that would automatically calculate and insert the correct temperature?
And if this is possible, what types of fields do I use and how do I reference them for purposes of calculations.
This can be achieved with user variables. I'll give a start-to-finish example in painful detail for clarity, and hopefully universal applicability to other cases.
Open a new text document.
Enter some text like Water boils at °F (°C).
Put the cursor before °F where you would normally type the number.
From the menus, choose Insert→Fields→More Fields…
Go to the Variables tab. Choose Type: User Field.
Below that, you'll see each User Field gets a Name and a Value. It will not appear in your document, but enter a Name for this variable we're using to store "water's boiling temperature in degrees Fahrenheit," lets say: BoilF
Enter the Value you want stored in that variable, and accordingly shown in this field in the actual document text. Here, its: 212
Click the Insert button to actually add the field to your document. You should see 212 appear in the text.
You've now added the field, but also created a variable that can be used elsewhere. Now to do the math and use it elsewhere:
Leaving the Fields window open, put the cursor before °C.
In the Fields window, select Type: Insert Formula.
Below that, enter the Formula: (BoilF-32)*5/9
Click the Insert button. You should see 100 appear in the text.
Should you ever need to update a number pair, double-click the first number—that is, the User Field in your text. Example steps, using the above starting point:
Add to the sentence so it reads
Water boils at 212°F (100°C) atop Everest.
It's now wrong, so double-click 212.
The Edit Fields window will appear. In the Value box, enter 154.4 and click the OK button. It will do the math and both temperatures will update in the text.
Water boils at 154.4°F (68°C) atop Everest.
Be mindful of variable names. If you have 20 temperatures scattered through your text, you should in turn have 20 user variables, with thoughtfully-chosen names.
I have a table that holds data of type Number that has a format of "R-"00 and in my Form that is linked to this table, I have a multi-combo box. When I go to select the values, they are correct - they all have the "R-00n" formatting where n is the actual number entry (auto-numbered). However, when I make my selection, the value will just read as 1, 2, 3 instead of R-001, R-002, R-003. How do I maintain my formatting after selections?
My query is SELECT Reference_ID FROM References for the Data of the combo-box in the form and it is pulling the right records, formatted correctly ("R-001, R-002, R-003") but when I make my selections, the value in the form is only 1, 2, 3. It drops the formatting. Is there something I need to configure in my Form to maintain the custom formatting?
Thank you.
I suppose you mean ListBox and not Combobox, right?
So I also suppose you already have some code to read the selected items of your ListBox like this:
Dim item As Variant
For Each item In YourListBox.ItemsSelected
Debug.Print YourListBox.ItemData(item)
Next
Regarding your problem:
You wrote that the tables field Reference_ID stores the number itself, but because it is formatted by "R-"000 it displays values like R-003.
So you already know, that the value itself stored is without formatting.
You could check that by retrieving the data like this:
?DLookup("Reference_ID","References","Reference_ID = 3")
It will show up 3 and not R-003.
So the same belongs when you read the data from the ListBoxes selected items.
As far as I know you can't read out the formatted text from the ListBox. But what you can do is to format the read value yourself:
Dim item As Variant
For Each item In YourListBox.ItemsSelected
Debug.Print Format(YourListBox.ItemData(item), "R-000")
Next
Another approach could be to set the Row Source of your ListBox to already formatted values:
Select Format(Reference_ID, "R-000") From References
I am having trouble changing the title of some columns in a pivot table. I'm trying to make them have dates in them. Each date 6 days further from the last.
Like this
But, I cannot get an equation inside the column title to stay, every time I type in the equation and press enter, it evaluates to either 0 (If the format of the cell is number or general), or 1/0/1990 (If formatted as a date). I checked the value of the cell by =ISTEXT(A1) and it evaluates as true. No matter how I format the cell. So I can never change the title to look like the picture. Any ides?
Here is what I have.
TRUE is the result from ISTEXT()
Even if I manually enter in the formula via the function arguments, it'll show up correct, but when I click ok. It will go back to either 0 or 1/0/1990
Here's the original page
https://drive.google.com/file/d/0B3p8Jm7oNAo4ZUN0Qk1mR1cxYmM/view?usp=sharing
In Excel, dynamic values (formulas) in the header of a table-formatted table are not allowed.
Instead, you can first generate your table header and then format the table as (pivot-)table. You should get a message saying that the header row will be converted in static text (with correct format).
Is there a way to have vba select a field in a word doc using the NAME attribute of the field CODE property? maybe using a pseudo selector?
background:
i have 8 fields (DOCPROPERTY Name_First, Name_Last, etc) in my document in 4 places (total 32 items)
instead of looping through the entire collection of fields, I want to be able to return a collection of fields that match Name_First, and then make changes,InsertAfter, etc, then call the update method on those fields only. Updating all fields is causing a noticeable delay on each form field when exited to the next field.
The MSDN documentation only shows examples using ordinal index numbers, which isn't very helpful in my real world. If someone changes the ordinal position of a field, DonkeyKong!
A bookmark can be referenced by name. If you want to update say 4 fields to reflect Name_First, you could place bookmarks on all 4 fields with names like "Name_First_1", "Name_First_2" etc. Then update the fields like:
For i = 1 To 4
ActiveDocument.Bookmarks("Name_First_" & i).Range.Fields(1).Update
Next
In your words: the bookmarked range is the pseudo selector. The field to update is always the first field in the referenced range.
I have problem in generate report. I use crystal report 8.5 with vb.net 2008,what I want is when I generate report it will appear red value, if the value is more or less than actual value else it will give default value but when I put this code it give me wrong result
If {Intake.wheatType} = {Spec.WheatType} AND
{Intake.HB43} >={Spec.M_Min} AND{Intake.HB43} >={Spec.M_Max} Then
Red
Else
DefaultAttribute
this report is related with two tables, which is table Spec and table Intake. Could anyone help/teach me how to fix this problem
When determining whether a value is between a minimum and maximum, the logic will be:
Is the value greater than the minimum and is the value less than the maximum?
Actually you can create a Formula Field for that,
From Field Explorer, right click Formula Field
A popup window will appear, type the name of the formula you want.
in the Formula Editor insert you custome formula
Code:
If {Intake.wheatType} = {Spec.WheatType} AND {Intake.HB43} >={Spec.M_Min} AND {Intake.HB43} >={Spec.M_Max} Then
Red
Else
DefaultAttribute
Then click OK. Drag the newly created field on your report. And that's it.
For more info, see this: Adding Formula Field