Access, VB, and DAO problem with a Memo Field 
Author Message
 Access, VB, and DAO problem with a Memo Field

I have a problem passing a query from an Access database to VB. I am using
DAO to connect to the database. I have a memo field that if I do a regular
select (or just return it in a query) it comes thru OK, however, if I run a
function/macro (don't know the correct term) in the query it cuts the text
of the memo field at 255 characters (the rest of the memo is garbage). The
garbage is the same so it appears to be reading the memory in the same place
(next record?). The same query appears fine in Access (no garbage). I can
not see anything wrong with my VB code, it is the same in displaying in a
text box, msgbox, debug window, or label.
The following function/macro causes the problem (Table1 is the table, ID is
a primary key and MemoField is the memo field of course, this was a test
line to see if it was my code or if it always happens even on another
machine).
ReturnMemo: IIF([Table1]![ID] >= 1, [Table1]![MemoField], "")

Has anyone ever experienced this before or know how to fix it? I can not
find anything in the MSDN Library nor on the internet about it.



Tue, 04 Dec 2001 03:00:00 GMT  
 Access, VB, and DAO problem with a Memo Field

Hi,
Generally you should use the GetChunk Method (Fields Container ) when
retrieving values from a memo field Or BLOB

Quote:

> I have a problem passing a query from an Access database to VB. I am using
> DAO to connect to the database. I have a memo field that if I do a regular
> select (or just return it in a query) it comes thru OK, however, if I run a
> function/macro (don't know the correct term) in the query it cuts the text
> of the memo field at 255 characters (the rest of the memo is garbage). The
> garbage is the same so it appears to be reading the memory in the same place
> (next record?). The same query appears fine in Access (no garbage). I can
> not see anything wrong with my VB code, it is the same in displaying in a
> text box, msgbox, debug window, or label.
> The following function/macro causes the problem (Table1 is the table, ID is
> a primary key and MemoField is the memo field of course, this was a test
> line to see if it was my code or if it always happens even on another
> machine).
> ReturnMemo: IIF([Table1]![ID] >= 1, [Table1]![MemoField], "")

> Has anyone ever experienced this before or know how to fix it? I can not
> find anything in the MSDN Library nor on the internet about it.

--
Regards
Pieter Wijnen


http://www.thuleeng.com

Tough guys don't take backup - tough guys cry a lot..

Good site to look for Access answers is Dev's site:
 http://home.att.net/~dashish
Also The Paradox Access Website:
 http://www.pcltd.co.uk/access/

  wijnen.vcf
< 1K Download


Sun, 09 Dec 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Memo fields - problems reporting 2 memo fields

2. Help with Access Memo Field (DAO)

3. Problem With Memo Fields And DAO

4. ADO, VB and Access MEMO field problem

5. VB dBase Clipper Access memo field problem

6. Problem with Access MEMO Fields & VB

7. Append memo field to a different memo field

8. Creating a Word doc from Access and Problems with Memo field

9. MS Access memo field problems

10. Problem retrieving the memo field in Access.

11. Access 2.0, Memo-field problem

12. Problem returning data from a scroll text box to an Access memo field

 

 
Powered by phpBB® Forum Software