473,785 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

memo fields - asking for trouble?

I have an mdb (2002 file format) that uses memo fields extensively. I've
read a lot about how problematic memo fields can be and that avoiding them
is a good idea. But I'm stuck with them and was wondering if there are any
best-parctices for optimizing or mitigating the risk of using them. Here's
what one table looks like:

NoteText - Memo
NoteDate - Date/Time (indexed, dupes ok)
NoteBrief - Text (length = 254)
Entity_ID - (Long, Foreign Key, indexed, dupes ok))
Note_ID - (Autonumber, Long, Primary Key)

This table is getting awfully big - would putting the NoteText field in it's
own table (so that's the only thing in the table) help, or does it really
make a difference?
Nov 12 '05
24 2723
> And I wouldn't do the updates in SQL, unless they were stored in a
different table. All I'd do is include the memo field in the form's
recordsource, and just not bind the control. For updates, something
like this in the control's AfterUpdate event:

Me!MyMemo = Me!fldMyMemo


Is this what you mean:

In the table I have "memNoteTex t", and in the form I have an unbound field
"txtNoteTex t" I have an OK button with:

Me!memNoteText = Me.txtNoteText

That puts the contents of the textbox into the table.

And Form_Open has this:

Me!txtNoteText = Me!memNoteText

Which populates the textbox with the data in memNoteText

Seems to be working. I thought I had to have a text box on the form to do
that. I didn't know I could reference the table field with the "Me.Field"
syntax without a textbox on the form - thanks for the tip!
Nov 12 '05 #11
deko wrote:
that. I didn't know I could reference the table field with the "Me.Field"
syntax without a textbox on the form - thanks for the tip!


Ooooh don't go down the route of the dot, imagine a field called "Name",
what do think me.name would return?

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 12 '05 #12
David W. Fenton wrote:
Using a rich-text control of any kind is asking for trouble.


Why?

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 12 '05 #13
> Ooooh don't go down the route of the dot, imagine a field called "Name",
what do think me.name would return?


10-4 - dot notation should be dropped like a piece of used dental floss...
still, the cool thing is being able to populate a table field *without a
corresponding bound control* on the form - as in Me!memNote = Me!txtNote
(where Me!txtNote is an unbound text box and Me!memNote is a memo field in
the table)

As for all those controls hiding behind the "More Controls" button on the
toolbox toolbar (e.g. the RTF textbox control) - Are these used often? How
are they different from the other "regular" controls? I couldn't get that
Microsoft Rich Textbox Control to work. I noticed some chart controls in
the list that looked interesting. Do you know of any code samples that
demonstrate how to use these?
Nov 12 '05 #14
deko wrote:
As for all those controls hiding behind the "More Controls" button on the
toolbox toolbar (e.g. the RTF textbox control) - Are these used often? How
are they different from the other "regular" controls? I couldn't get that
Microsoft Rich Textbox Control to work. I noticed some chart controls in
the list that looked interesting. Do you know of any code samples that
demonstrate how to use these?


They're different in that they're not actually part of Access, just
controls that are registered. Code samples, if there any would be
numerous and diverse, each control will have it's own properties and
methods. Apart from .top, .left, etc you get with all controls the RTF
control has a .Text and .TextRTF properties, use the former for a
similar function to a textbox without the 64K limit.

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 12 '05 #15
"deko" <de**@hotmail.c om> wrote in
news:kd******** **********@news svr25.news.prod igy.com:
And I wouldn't do the updates in SQL, unless they were stored in
a different table. All I'd do is include the memo field in the
form's recordsource, and just not bind the control. For updates,
something like this in the control's AfterUpdate event:

Me!MyMemo = Me!fldMyMemo
Is this what you mean:

In the table I have "memNoteTex t", and in the form I have an
unbound field "txtNoteTex t" I have an OK button with:

Me!memNoteText = Me.txtNoteText

That puts the contents of the textbox into the table.

And Form_Open has this:

Me!txtNoteText = Me!memNoteText

Which populates the textbox with the data in memNoteText


I'd populate Me!txtNoteText in form's OnCurrent event, and save the
changes in the AfterUpdate even of the unbound control.
Seems to be working. I thought I had to have a text box on the
form to do that. I didn't know I could reference the table field
with the "Me.Field" syntax without a textbox on the form - thanks
for the tip!


Well, I'd use Me!Field, but, yes, of course it works.

It has always worked, from the earliest days of Access.

That is, the form has a Controls collection and a Fields collection.
The latter is all the fields in the underlying recordset, not all of
which need appear in controls on the form.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #16
Trevor Best <nospam@localho st> wrote in
news:40******** *************** @auth.uk.news.e asynet.net:
David W. Fenton wrote:
Using a rich-text control of any kind is asking for trouble.


Why?


Because of DLL Hell.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #17
> That is, the form has a Controls collection and a Fields collection.
The latter is all the fields in the underlying recordset, not all of
which need appear in controls on the form.


Hmmm... I guess that means I don't need to use a hidden (i.e. visible = no)
text box on a form to hold stuff like ID numbers. I was in the habit of
putting hidden text boxes on the form whenever I needed to do stuff like
this:

Private Sub Categories_Clic k()
Dim intCatId As Integer
intCatId = Me!Cat_ID '<<== Cat_ID text box on form
CallSomeFunctio n (intCatId)
End Sub

I've been experimenting - even the Link Child/Link Master properties for Sub
Forms/Main Forms seems to work without the hidden text box - Is there ever a
time when I need to use a hidden text box on a form to hold an ID number?
Nov 12 '05 #18
deko wrote:
I've been experimenting - even the Link Child/Link Master properties for Sub
Forms/Main Forms seems to work without the hidden text box - Is there ever a
time when I need to use a hidden text box on a form to hold an ID number?


The LinkChild will work only with columns from the recordsource and not
textboxes AFAIK.

I usually have a hidden control on each form called txtPK, which is
bound to the primary key field. It just makes it easier that I know I
can reference txtPK rather than have to remember what the primary key is
actually called.

--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Nov 12 '05 #19
"deko" <de**@hotmail.c om> wrote in
news:KE******** *********@newss vr27.news.prodi gy.com:
That is, the form has a Controls collection and a Fields collection.
The latter is all the fields in the underlying recordset, not all of
which need appear in controls on the form.


Hmmm... I guess that means I don't need to use a hidden (i.e. visible =
no) text box on a form to hold stuff like ID numbers. I was in the
habit of putting hidden text boxes on the form whenever I needed to do
stuff like this:


The recordsource's fields are saved when the form is saved. If you change the
form's recordsource at run time you may very well have to use a hidden
control to interact with a new field. If the field is vital I always use a
hidden field to ensure that, if in some new mainfestation of the form I
change the recordsource, the reference to the field is always there.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
22771
by: intl04 | last post by:
I have a memo field that is included in some Access reports I created. Is there some way for the memo field to display nicely formatted text, with line breaks between paragraphs? Or is it necessary to export the report? I tried exporting a report by using the .rtf rich-text format (the plain-text format was the only other word-processing option listed when exporting). I then opened the .rtf file in Word. However, it looks like some...
24
1354
by: deko | last post by:
I have an mdb (2002 file format) that uses memo fields extensively. I've read a lot about how problematic memo fields can be and that avoiding them is a good idea. But I'm stuck with them and was wondering if there are any best-parctices for optimizing or mitigating the risk of using them. Here's what one table looks like: NoteText - Memo NoteDate - Date/Time (indexed, dupes ok) NoteBrief - Text (length = 254) Entity_ID - (Long,...
1
1888
by: Remco Groot Beumer | last post by:
Hello, In an Access 97 database, there is a table that has some Memo-fields. Some of the memo-fields (not all) with a lot of text in it, display the data blurred all over each other (two textlines are written over each other at the same time). These memo-fields become unreadable by this. Does anyone know how to solve this?
1
3058
by: alexsg | last post by:
A little while ago Ron P kindly responded to my inquiry on how to copy the first line of memo field into a text field, using a query: left(,instr(1,,vbCrLf)-1) This is great, but I would like to do this on a form, so that the person entering the memo can use a button to paste the 1st line to a title (text) field. I'm having trouble setting up the code to do this. I'd also appreciate some ideas on how to get the 2nd and 3rd lines...
10
3059
by: ARC | last post by:
This is mainly a speed question. In this example: I have a QuotesHdr table that has a few memo fields. If these memo fields are used extensively by some users, and if their are a large number of records in QuotesHdr, should I break out the memo fields into a separate table? The thinking here is that, for Quotes selection dropdowns that display all entries in QuotesHdr for selection, I would think that the entire record comes down over...
4
5668
by: Wayne | last post by:
I've been asked to construct a database which will require several memo fields. This database will be the standard frontend/backend mdb configuration. I have read many posts describing the corruption problems associated with memo fields, especially in a networked environment. Am I asking for trouble if I go ahead with this project?
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10330
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10153
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8976
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.