473,396 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

size of a field is too long error

Hi all

I have used knowledge base article 112747 to improve my subforms
performance. I am using Access 97.

I have a main form where i put an extra textbox which concatenated
TeamID WeekNum Weekday, ie value might be 15Monday. I then put in a
field in my query behind my subform which held the same info and used
these fields to link the mainform to the subform.

My subform also has a subform, so I went through the same process to
link these 2 forms.

On my main form I have a combo box which allows me to find a team on my
form based on selection in combo. A combo on subform is then limited to
members of that team. However, when I selected (one particular) team
member in the subform, I got a size of a field is too long error. This
then froze my database and I had to ALT CTL DELETE to get out.

I deleted the links created above linking the subform to its subform and
still got the error. So I am assuming that the error was caused by the
link fields for the Main form and subform. I can't see how the field
value could be too long as it is simply 2 numbers and a day of the week
value.

Anybody got any clues.

Thanks
Michelle

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
2 5728
Michelle wrote:
Hi all

I have used knowledge base article 112747 to improve my subforms
performance. I am using Access 97.

I have a main form where i put an extra textbox which concatenated
TeamID WeekNum Weekday, ie value might be 15Monday. I then put in a
field in my query behind my subform which held the same info and used
these fields to link the mainform to the subform.

My subform also has a subform, so I went through the same process to
link these 2 forms.

On my main form I have a combo box which allows me to find a team on my
form based on selection in combo. A combo on subform is then limited to
members of that team. However, when I selected (one particular) team
member in the subform, I got a size of a field is too long error. This
then froze my database and I had to ALT CTL DELETE to get out.

I deleted the links created above linking the subform to its subform and
still got the error. So I am assuming that the error was caused by the
link fields for the Main form and subform. I can't see how the field
value could be too long as it is simply 2 numbers and a day of the week
value.

Anybody got any clues.

Thanks
Michelle

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


MF = MainForm
SF = SubForm
SSF = Sub-SubForm

In SF, you added a column to the query. Let's call it KEY. It stores
the TeamID WeekNum Weekday. Thus 15Monday would be first week, team 5,
Monday.

In the form MF, you have a textbox to hold the concatenated fields and
in my example is called KeyField.

So your criteria for the field Key in SF's recordsource you have
Forms!MF!KeyField

So when you change a value in the combo box, you probably have something
in the AfterUpdate event of the combo box something like
Me.SF.Form.Requery
so that you now display the correct records in the subform.

That makes sense. Now you need to create another field in SF. Let's
call it SFKey. In it you store a concatenated value from the current
record. This key value will link to SSF. Since you want related
records in SSF to appear as you go the records in SF, you could place
the OnCurrent event for SF the following
Me.SSF.Form.Requery
(since I haven't done much or any work with sub-sub forms you might need
to futz with this under various entries)
Forms!MF!SF.Form!SSF.Form.Requery
or some odd syntax similar to that. It might even be
Forms!MF!SF!SSF.Form.Requery

Now you open in design SSF and create a concatenated column in the
recordsource and call the column SSFKey. In the criteria row of SSFKey
you enter
Forms!MF!SF!SFKey
This will link to the SFKey field in the subform SF.

This concept may get you closer to your goal


Nov 12 '05 #2
Hi Michelle,

Hmmmm ... I'm not 100% convinced on what that KB article suggests, but then
again most of my tables are relatively small.(<5000 records)

Microsoft used to brag up what they referred to as "Rushmore" technology
starting with Access 2.0. They were also "big" on the fact that queries were
supposedly better optimized than tables. Regardless ... in my experience
anyway, subform "performance" has really never been an issue.
Maybe it *was* on a 386 with 4 MB ram?

IMHO, good table and subform design are far more useful and important than
using cocatenated field links.
I have some concerns about the validity of cocatenated field links.
Cocatenation, I believe, coerces all data types (i.e. Long Integer, Date,
Currency) to Text ... is that a good idea?
What happens if one of those cocatenated fields contains a Null value? Or
that they may be ambiguous in several other ways?
Your example below seems to imply that may even be the case.
i.e TeamID, WeekNum,Weekday = 15Monday

Is that TeamID = 1, WeekNum = 5, Weekday = Monday?
or could it be TeamID = 15 , WeekNum = Null, Weekday = Monday?
or maybe TeamID = Null, WeekNum = 15, Weekday = Monday?

I think you can see my point ... you may end up with data that is not
correctly linked.

Another option to consider:
LinkMaster / LinkChild can use more than one field seperated by semi-colons,
as long as the number of fields and order of those fields match.
Using "TeamID; WeekNum; Weekday" will totally disambiguate the link,
preserve the data types, and will also even *insert* values into the
associated Child fields in a new record in order to preserve the link
integrity. I just can't see that happening if you're using the cocatenated
field method.

IF your primary LinkMaster / LinkChild fields are the same fields that link
your tables, you should I think, still be using an indexed field. I think
that was the "claim-to-fame" for Rushmore, so performance should not be
hindered.

That's the way I see it anyway...

Regards,
Don
"Michelle" <mi*************@poferries.com_NOSPAM> wrote in message
news:40*********************@news.frii.net...
Hi all

I have used knowledge base article 112747 to improve my subforms
performance. I am using Access 97.

I have a main form where i put an extra textbox which concatenated
TeamID WeekNum Weekday, ie value might be 15Monday. I then put in a
field in my query behind my subform which held the same info and used
these fields to link the mainform to the subform.

My subform also has a subform, so I went through the same process to
link these 2 forms.

On my main form I have a combo box which allows me to find a team on my
form based on selection in combo. A combo on subform is then limited to
members of that team. However, when I selected (one particular) team
member in the subform, I got a size of a field is too long error. This
then froze my database and I had to ALT CTL DELETE to get out.

I deleted the links created above linking the subform to its subform and
still got the error. So I am assuming that the error was caused by the
link fields for the Main form and subform. I can't see how the field
value could be too long as it is simply 2 numbers and a day of the week
value.

Anybody got any clues.

Thanks
Michelle

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #3

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

Similar topics

15
by: Nikolai Borissov | last post by:
I know that C++ Standard does not impose any requirements for the size of _long_ type. I wonder what is the size of _long_ in reality? I don't think that there are architectures with 1-byte _long_....
1
by: Janick Bernet | last post by:
Since DB2 V8 command center always displays the full error message. Not only the SQL error number and some short specific information, but the whole bunch of additional stuff which you find in the...
2
by: Michelle | last post by:
Hi all I have used knowledge base article 112747 to improve my subforms performance. I am using Access 97. I have a main form where i put an extra textbox which concatenated TeamID WeekNum...
2
by: Robert McEuen | last post by:
Using Access 97, Windows XP I'm receiving a Numeric Field Overflow error during text import that I did not receive before I split my database. Another thread I found suggested that the cause of...
10
by: David Hill | last post by:
Hello - What value should SIZE have? int main(void) { long num = 1343331L; char buf; snprintf(buf, sizeof(buf), "%s", num);
9
by: Rajat Katyal | last post by:
Hi: Whenever i try to insert the data, size of which is greater than that of column datatype size, I got the exception value too long for..... However this was not in postgresql7.2. Can...
4
by: cpp_novice | last post by:
What is the minimum size of 'long' according to the ANSI 1990 standard? I thow that c99 requires longs to be atleast 32bits wide. Is there an electronic copy of the 1990 standard available...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
8
by: mrcw | last post by:
Hi I've added a textbox called tbAccel0 to a form. It shows up on the form with the correct name, but when I look at the code a red squigly line appears under tbAccel0 and an error appears in the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.