Hi folks, first time post here, so please be gentle I have a database that contains a table with a number of memo-type fields (text1, text2, text3). These can't be text-type because they can potentially contain upwards of a few thousand characters (255 char limit on text).
Now, I've got a form that we use to enter data into the table, and view it, and it all gets saved fine (that is, it's all there when I change or restart) and I can see it all in the form. When I open a query that includes these fields (the SQL query is in a variable called sql_all) through:
Dim rs_gr As DAO.Recordset
Set rs_gr = db.OpenRecordset(sql_all).Clone
I can address the text fields with rs_gr("text1") etc, but I can only get the first 255 characters out this way.
I initially thought this was a limitation of the string-type variable I was putting the data into, but it seems that Len(rs_gr("text1")) returns 255, even before any other variables are involved.
I'm looking for some insight into how these different ways of accessing the dataset (through a form, or VBA) affect what comes out. Ultimately I'd like some advice on how I might fix the problem - how I can use VBA to get the full length memo into a variable (and what kind of variable - and how to convert that to a string, I guess). Perhaps I should be using a different data type in my table? I am using the variables to replace bookmarks and output a word document. This whole process works fine (without errors, even) at the moment, but dutifully outputs .DOCs with only 255 characters in each of the text areas.
I hope someone can help me - I can't imagine this is a novel problem, but I can't seem to find any help on it.
Thank you all in advance,
Best regards
Sandy
Now, I've got a form that we use to enter data into the table, and view it, and it all gets saved fine (that is, it's all there when I change or restart) and I can see it all in the form. When I open a query that includes these fields (the SQL query is in a variable called sql_all) through:
Dim rs_gr As DAO.Recordset
Set rs_gr = db.OpenRecordset(sql_all).Clone
I can address the text fields with rs_gr("text1") etc, but I can only get the first 255 characters out this way.
I initially thought this was a limitation of the string-type variable I was putting the data into, but it seems that Len(rs_gr("text1")) returns 255, even before any other variables are involved.
I'm looking for some insight into how these different ways of accessing the dataset (through a form, or VBA) affect what comes out. Ultimately I'd like some advice on how I might fix the problem - how I can use VBA to get the full length memo into a variable (and what kind of variable - and how to convert that to a string, I guess). Perhaps I should be using a different data type in my table? I am using the variables to replace bookmarks and output a word document. This whole process works fine (without errors, even) at the moment, but dutifully outputs .DOCs with only 255 characters in each of the text areas.
I hope someone can help me - I can't imagine this is a novel problem, but I can't seem to find any help on it.
Thank you all in advance,
Best regards
Sandy