By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

size of a field is too long error

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.