field count, error 1390

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm getting error 1390 "Too many fields defined". I don't have 255 fields
(not even near that count..), but I found out that Access keeps record of all
the changes that I make to a table's fields and the error comes weather I
have the fields of not if I make enough changes.

Is there any way to set the count of the fields of the table to zero (or
one) in code? Or is the only way to compact and repair database?

Thanks for help :)
-Beginner-
 
I believe the only way is to compact. (Why would you want to set the count
of fields to 0 or 1 if that's not the actual count?)
 
Thank you for the answer, that is what I thought, but wasn't sure..

In my code I need to create and drop columns (sql). When I drop what I don't
want the amount of fields is 6 but Access doesn't notice the dropping, so
when I test my code (and do the creating and dropping a lot! :) ) I need to
compact and repair my database every now and then beacuse the amount of
columns seems to be too much.

-Beginner-
 
Can you explain why you need to add and drop columns? That should
almost never be necessary in a properly designed database.

Perhaps there is a better solution available.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Hi!

I need to add and drop columns because the column names change, and the
person I'm doing this for wants to see the right names in the right columns.

-Beginner-
 
Hi!

I need to add and drop columns because the column names change, and the
person I'm doing this for wants to see the right names in the right columns.

Don't confuse data STORAGE with data PRESENTATION.

The user should never need to even *know* what the fieldnames are, because the
user should never see a table datasheet.

The user should be presented with a Form (for onscreen use) and a Report (for
printing). They can have whatever names they like in Labels on the
form/report.

John W. Vinson [MVP]
 
Yeah, I know :) But here the user isn't just a user, there is so much more
to this storage of mine.. And I cannot explain it because I don't want to
give out too much information about what I'm doing. Internet is such a public
place! :) But I have certain things that I have to do to accomplish other
things that I can use to do other things. Perhaps my way isn't sometimes the
best way to do something, perhaps sometimes it is, but everything I have
coded works. So I'm quite happy :) And I'm also happy that in this forum I
can ask even silly questions and there is always someone who wants to help,
so thanks!

-Beginner-
 
If you insist on doing it the way you are, then the only way I know to reset
the "field counter" is to compact and repair.

An option for you might be to use temporary database with temporary tables
and link to that. OR you could add or edit the caption property of the
fields in the table. That won't change the field names or field types but
will change the column header when the table or query is presented in
DataSheet view.

Since you can't share more information on what you are attempting I hope
that the above will give you some ideas on alternative methods to handle
your problem.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Another approach would be to use a query that aliases the field names to the
desired names, and use the query rather than the table.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)
 
I think that compact and repair is enough for me, because the thing I'm doing
only needs to be run once a day. Thanks for the advice, I'll definately check
that caption property and see if it would fit my needs!

-Beginner-
 
Back
Top