Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to create Duplicate Query with memo field 1

Status
Not open for further replies.

lenebene

Programmer
Sep 24, 2002
15
US
Hi! I am having a problem creating a Duplicate Query(one of the wizard queries) when I have a memo field. I have a memo field because when I imported the excel file into access the field was too big so access converted it to a memo field instead of a text file. If I convert the field to a text field I will lose a lot of data that is needed for the duplicate query. Let me know if there is anything that I can do.

Thank you!
Charlene
 
As a starter try a SELECT query that has a column:

Len([memofield]).

See how many of them exceed the largest text field (255). Maybe you can truncate a just a few with a field datatype conversion.

Jeffrey R. Roberts
Insight Data Consulting
Access, SQL Server, & Oracle Development
 
Another thing you could try is to split up the data in the memo field into multiple text fields like:

TextField1: IIf(Len(Trim(MemoField))>255,Left(MemoField,255),Trim(MemoField))

TextField2: IIf(Len(Trim(MemoField))>255,Mid(MemoField,256,Len(Trim(MemoField))-255),"")

And so on until you have captured all of the data from the longest string. You can use the query that Quehay suggested to find the length of the longest values. If the maximum length is fairly consistent you can create just as many of these parsed fields as you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top