I just started using Access 2013 and there are two new data types, Short Text and Long Text. I need to programatically add a table in SQL and I used to use TEXT(100) or something like it, but what do I use to create a column of type Long Text? I need the field to be like the memo type in previous versions of Access, basically limitless or very large.
You can use Long Text just like the memo type:
In earlier version (before A2007) we had the RTF presentation for Memo
fields. The implementation was - IIRC - storing the text you had on
the screen in Word RTF format with some cryptic codes in {} to
indicate the formatting. In A2007 they changed to the new formatting
known as Rich Text. This is stored in the Memo field with HTML tags
implement the formatting. The thing they changed now is not the UI for
these fields but the name of the datatype in the database. It's not
called MEMO anymore, now it's called LONG TEXT. The formatted text
should AFAIK still be stored in the same way, as HTML coded text. When
you switch from plain text to rich text you do nothing else then tell
Access to use another UI to display the content of the data in the
database. Stored is still the same.
You can read more from here
Oops, I found it. It's just LONGTEXT.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms714540(v=vs.85).aspx
Related
I'm trying (and failing) to fill out a text box (TextFrame) in Publisher using a macro from content in a Word table. I'm trying to do something along the lines of:
With doc.Pages(1).shapes(1)
.GroupItems.Item(8).TextFrame.TextRange = table.Cell(2, 3).Range.FormattedText
End With
The source text from table has a bunch of font formatting that I need in the text box but it won't seem to be able to copy over the formatting and I just get the plain text. Any ideas on how to get this working properly?
Edit: It seems like TextFrame can't accept formatted text at all. Is there any way around this?
In Word TextFrame.TextRange returns a range which has a FormattedText property. The usage for that would be:
.GroupItems.Item(8).TextFrame.TextRange.FormattedText = table.Cell(2, 3).Range.FormattedText
In your code you haven't specified which property of the TextRange you want to assign the formatted text to. This means it will be assigned to the default property, Text, which is just a string and cannot contain any formatting.
Golden Rule: never rely on default properties, always specify the
property you want to use.
Given that you appear to be taking a value from Word into Publisher you should be looking at the documentation for VBA in Publisher which shows you that the TextRange object in Publisher does not have a FormattedText property, so you cannot take formatting across using this method.
I've done some extensive research and realize this is not an easy task.
I need to change many hyperlinks in different tables from P:\Library\Folder... to I:\Folder...
I think I can change the field type to long text, find and replace, change type back to hyperlink.
Table Find/Replace dialog will work on Hyperlink field if there is no DisplayText component in hyperlink string.
In either case, an SQL UPDATE action will work, like:
CurrentDb.Execute "UPDATE table SET field = Replace([field], 'P:\Library\', 'I:\')"
It is possible to have hyperlink functionality on form and report in ReportView without Hyperlink type field. Of course this will require alternate method than hyperlink field interface to enter file path into text field - probably with VBA executing File System Object dialog. Hyperlink click will not be possible in table but since users should not interact with tables and queries, just forms and reports, this should not be an issue.
I have a PDF form that I'm filling out with data using progress-4gl. To date, I've been only filling in text fields using the following syntax:
put stream stream1 unform
"^global CHX_SINGLE_CE_PLAN3" skip(0)
"X" skip
CHX_SINGLE_CE_PLAN3 is the field name...
This code works when dealing with text fields but I'm trying to check a box instead of fill in a text field. I cannot find any documentation on this. Is checking a box on a fillable pdf form even possible with 4gl?
As far as I remember PDF Include has support for filling fillable forms. Whilst it's probably a bit over the top in terms of what you want to achieve, it's an open source project and so you may well find the answer to your question within the code itself.
Here's a link to the project page: http://www.oehive.org/pdfinclude
I discovered the answer, which I thought I had already tried before asking this question. The answer is you need to pass the value "Yes" (with capital "Y") in order to check the checkbox. The correct code in this instance is:
put stream stream1 unform
"^global CHX_SINGLE_CE_PLAN3" skip(0)
"Yes" skip
I believe this is the case no matter which language you're using
I have a Microsoft Office 2013 Word template, in which I have some text-field elements, created by using Quick Parts -> Field -> MACROBUTTON noname [Type your text here].
If I fill only some of these fields (i.e. "[Name]", "[Address]") and I print or save as PDF, all the fields that I have not filled will display as [Insert your text here] in the printed paper or PDF. To be clear, the placeholder text must be manually removed (or replaced with the text you want).
I've readed somewhere, that you can create a macro, which will not display the placeholder text in the PFD- or printed version of the document, if there is no text written manually to that specific field (you leave it as it was). As this would be handy in cases, where you don't fill all the neccessery fields, my question is:
Q: Can this be achieved only by using Macro Button, and if not, what is needed to create text fields as described below that are not included in the printed or PDF saved version of the document?
This cannot be achieved without using actual macro code. Right now your solution contains no macro code, the fields simply function as "targets" and when the user types on the field it is deleted. Where the user does not type, the prompt remains. You'd need code to delete these fields from the document.
Given your requirement, the code would have to fire in the DocumentBeforeSave and the DocumentBeforePrint events. These events require a class and supporting code in a standard module. The basic information on how to set these up is in the Word object model language reference: https://msdn.microsoft.com/en-us/library/office/ff821218.aspx
An alternative to MacroButton fields would be to use ContentControls. But here, again, code and the same events would be required to remove/hide placeholder text.
When reading a csv file containing ID numbers, excel is reading strings as numbers. This also occurs when reading the same style of ID's in an excel vba array.
Under locals, the elements of the array are displayed as datatype "String", but the format is still a number.
I have tried changing the style to text as well as using CStr() on individual elements of an array. Is there a way to have excel read the ID's as a string instead of a number?
Thanks.
You need to bypass the automatic conversion when you open the .csv file.
Use the Import Wizard to open the file and tell the Wizard that the field is text.
To convert back this might suit:
=SUBSTITUTE(LEFT(A1,3),".","")&"E"&TEXT(RIGHT(A1,3)-1,"0000")