ms access show when save too many fields defined how to fix it?

midosoft

Registered User.
Local time
Today, 03:15
Joined
Mar 23, 2013
Messages
12
I have a project in vb6 with mdb access 97 database
I need 165 text field and i need all to be memo for more size than 50
access give me "too many fields defined" and doesn't save it .


Please help me if any tools fix that
Thanks
 
You can set your text fields up to a maximum of 255 characters - 50 sounds like the default size.

You can have a maximum of 255 fields in a table although I believe this is dependant on the field type so you may have gone over limit by having all as memo fields.

So far as I know there is no fix to exceed these limits.

Sounds an extrodinary project - can you not have a table with 1 memo field and 165 records?
 
Nooooooooooooooo

I need to create 165 text every one as one field

--------
look can you help me to save all 165 textbox.text to 165 txt file or like that in one line

text1 = line 1 text.txt
text2 .........
3
4.....
text165= line 165 text.txt


I hope you can understand me and give me help for that
 
Wanting so many fields in one table is generally a sign that the database structure is not optimum. I expect that many of the fields should be implemented as records in related tables.

Tell us more about your database and why you want so many fields.
 
I agree with Galaxiom, something does not smell right here. Can you give a snippet of these 165 fields??
 
please look and tell me
 

Attachments

  • midosoft.project.jpg
    midosoft.project.jpg
    100.5 KB · Views: 245
Your picture didn't really help me understand much better. But from the image you have both rows and columns marked as 'fields', which makes me think some of your data is not normalized.

Can you list the names of your 165 fields (in English/pseudocode, of course)?
 
its a table as 165 textbox "any text"
I just need to be able to save more then 50 characters per field
with mdb access database table " too many fields defined"
for that
I need to save all 165 to another file type like rtf
rtf file make me save text and size and font type and color etc....
----------------------------------------
so I need to know that please
1- how to save 165 textbox to one rtf file every time I fill it all or some of all
2- how to save every textbox at line of rtf file with font type or size or color
as semple
textbox.text "my text" 1 will be in the line 1 of rtf file
textbox 2 "my text" will be in the line 2 of rtf file
textbox 3 "my text" will be in the line 3 of rtf file
etc........
3- how to clear all and create a new rtf file and after save create another rtf file like name 0000001.rtf , 0000002.rtf etc.....


I wish you understand me and help me
thanks alot
 
You mentioned you have a 97 mdb

I have a project in vb6 with mdb access 97 database

So far as I am aware, pre 2007, the best you would get was the whole field being bold, underline or whatever - so this wouldn't work
textbox 3 "my text" will be in the line 3 of rtf file

From the way you are describing the data (and leaving format out of it at the moment)- this implies you have a 165 line rtf file and you are trying to import each line into a separate field. Is this correct?

If you can explain what you are trying to do, we may be able to come up with a solution
 
From the way you are describing the data (and leaving format out of it at the moment)- this implies you have a 165 line rtf file and you are trying to import each line into a separate field. Is this correct?

If you can explain what you are trying to do, we may be able to come up with a solution

Yes Correct
textbox1.text will save my text to line number 1 on rtf file

textbox2.text will save my text to line number 2 on rtf file

textbox3.text will save my text to line number 3 on rtf file

textbox4.text will save my text to line number 4 on rtf file

save one time to 0001.rtf file and after click new it will automatic create 0002.rtf and clear textboxs before save

like database but not in mdb
but in rtf files

:)
 
its a table as 165 textbox "any text"
I just need to be able to save more then 50 characters per field
with mdb access database table " too many fields defined"
for that
I need to save all 165 to another file type like rtf
rtf file make me save text and size and font type and color etc....
----------------------------------------
so I need to know that please
1- how to save 165 textbox to one rtf file every time I fill it all or some of all
2- how to save every textbox at line of rtf file with font type or size or color
as semple
textbox.text "my text" 1 will be in the line 1 of rtf file
textbox 2 "my text" will be in the line 2 of rtf file
textbox 3 "my text" will be in the line 3 of rtf file
etc........
3- how to clear all and create a new rtf file and after save create another rtf file like name 0000001.rtf , 0000002.rtf etc.....


I wish you understand me and help me
thanks alot

You have still not provided sufficient information for anyone to give you the help that you are looking for. Based only on what you have said so far, the obvious answer would be "you can't get there from here", but I do not believe that is true.

I suspect that your issue is not just a matter of too many Fields in one Table, and instead is an issue related to a Database Design that is storing information in one Table that it could/should be storing in multiple Tables.

If you cannot or will not show us the Field names and Structures for your Table, look at them yourself and ask the following Question:
  • Are there groups of repeated data in the Table?
For instance, within your many Fields could be groups of Data based on Time allotments (Days, Weeks, Months, or Years), or possibly repeated groups of Data for different project entities (Groups, Manufacturers, Customers, etc.)

If any of this is true, the Database should probably be restructured and the one Table should be converted into multiple Tables containing the same information.

-- Rookie
 
Yes Correct
textbox1.text will save my text to line number 1 on rtf file

textbox2.text will save my text to line number 2 on rtf file

textbox3.text will save my text to line number 3 on rtf file

textbox4.text will save my text to line number 4 on rtf file

save one time to 0001.rtf file and after click new it will automatic create 0002.rtf and clear textboxs before save

like database but not in mdb
but in rtf files

:)
That's what I get for being slow. What I said in Post #11 applies. Instead of a Table that has a separate Text Field for each row, another option would be a design that has only Three Fields (PrimaryKey, RowID, "RowTextValue). When writing to the Text File, you would write one row at a time as opposed to one Field at a time. Converting to a design like this will require a little work on your part, but it should eliminate your problem with too many Fields.

-- Rookie
 
I'm still strugging to understand why you need a separate field for each row. Is it because of the limits of formatting in a 97 mdb? Or because you want to create something similar to something that is easily available in Access 2010?

Your required solution of 165 memo fields is not viable so a different solution needs to be found. Please can you provide some more information of what you want to be able to do - go back to the beginning and explain from there.
 
I'm still strugging to understand why you need a separate field for each row. Is it because of the limits of formatting in a 97 mdb?

Yes for that

I a have brochure design as jpg "A4" as "3508 x 2480" this design renewed every day with new text on it
text fields are 165 field and every one maybe content more than 50 Character , so i need to save all texts every day.

they cant work on photoshop
so they need something easy like ms word for read and write and save and print and edit .



1- I want to create a database as rtf files without access mdb
2- I rtf line per textbox.text
3- every one time I save all 165 the software create a new as 001.rtf 002.rtf

so I want a database by rtf file by vb6
can you help me please look at the attached jpg file
 

Attachments

  • midosoft.project2.jpg
    midosoft.project2.jpg
    71.9 KB · Views: 182
Your current structure is not normalized.

Store the text as separate records in one field of a related table. Then you can have as many of them as you want.

Include the information that designates what you are currently using to define which field they belong in as values in another field in the related table.

Note that the normalized structure I have described allows any number of new "fields" to be included without changing the structure of the tables.
 
I'm still strugging to understand why you need a separate field for each row. Is it because of the limits of formatting in a 97 mdb? Or because you want to create something similar to something that is easily available in Access 2010?

Your required solution of 165 memo fields is not viable so a different solution needs to be found. Please can you provide some more information of what you want to be able to do - go back to the beginning and explain from there.

CJ_London
Where you are?
 
Sorry - been away.

I still think the data can be stored in one table with 165 records (each record consisting of a memo field) however if you want to have something like you are proposing then Galaziom has a good solution - have 2 or 3 tables, each with 50-60 memo fields in it.
 
CJ_London loooooooook I found something better with rtf file save line by line.
but I need to know how to save text with format (font type, size, color) ? if you can help me :)

look at attached vb2010 my project zip file
 

Attachments

I'm sorry Mido, I don't think I can be much help but looking at your attachment, I would concentrate on the code in this procedure.

PrivateSub OpeToolStripMenuItem_Click which is in your form1.vb file

I've added a suggestion in orange, but my vb is very rusty so you may need to find the correct terminology

PrivateSub OpeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpeToolStripMenuItem.Click
Dim OpenFile AsNew OpenFileDialog
OpenFile.FileName =
""
OpenFile.Filter = "Rich Files (*.rtf)|*.rtf|file(*)|*|All Files (*.*)|*.*)"
OpenFile.Title = "Open File"
OpenFile.ShowDialog()

dim mydb as database
dim rst as recordset

set mydb = opendatabase("YourDataBase")
set rst=mydb.openrecordset("YourTable",,AppendOnly)
Try
Dim Read AsNew System.IO.StreamReader(OpenFile.FileName)
-- ignore RichTextBox1.Text = Read.ReadLine
while not read.eof
rst.richtxtfield=read.ReadLine
rst.addnew
wend
rst.close
set rst=nothing
--- ignore RichTextBox2.Text = Read.ReadLine
Read.Close()
Catch ex As Exception
EndTry
EndSub
 

Users who are viewing this thread

Back
Top Bottom