Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-Time error 3190 plus more

Status
Not open for further replies.

BH

Programmer
Oct 15, 2002
76
GB
Hello

After yesterdays success (Only because of HarleyQuinns help thread705-1416367) today has gone pear shape!

Through code I have managed to add text fields and checkbox fields to a seperate database table. The only thing not quite right was the checkbox properties in the table were randomly coming out as text or checkbox, there was no apparent reason why it should work then not work. I called it a day and have just returned to it to try and sort this out. Unfortunately all I am getting now is a run-time error 3190 to many fields defined!

Even though I have tried the update with only one field the message is still the same. I have even tried right from fresh by setting up a new db but I still get the message.

Please can any one shed some light on this. The code I am using is:

Dim db As DAO.Database
Set db = OpenDatabase("c:\db1")

Dim tdf As DAO.TableDef
Dim fld As DAO.Field

Set tdf = db.TableDefs("tblField")
Set fld = tdf.CreateField("CheckBoxField", dbBoolean)
tdf.Fields.Append fld

fld.Properties.Append fld.CreateProperty("DisplayControl", dbInteger, CInt(acCheckBox))

db.Close
Set db = Nothing

 
BH,
There is a "life time" field counter in Access, if you have been running code over and over (and over...) you may have hit this.

Try Compacting (or compact and repair) and see if this solves the problem.

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Thanks CautionMP

That has got rid of the 3190 error.

Unfortunately I now have a 424 error! Will be hopefully working on the code again later in the week so I will resume with the error fixing!

BH
 
Set db = CurrentDB? Object missing (error 424) could be c:\db1, or maybe it should be c:\db1.mdb?

The early bird may get the worm, but the second mouse gets the cheese in the trap.
 
Thanks genomon for responding. I have checked my database address path and it appears ok.

Well spotted with the address error I posted. Unfortunately that was just a typo error on this posting, the real address is much longer but looks fine. How bizarre though, it worked one day, the next day nothing but errors!

I will keep plugging away....must be something daft I'm missing!

 
Another thing to check is project references. Since you are using DAO, it sgould be higher on the priority list then the ADO reference (happened to me before - no idea how they got changed).

The early bird may get the worm, but the second mouse gets the cheese in the trap.
 
Thanks genomon

My ADO was above the DAO so thank you for pointing that out. Still no joy though! Looks like I am going to have to start right from fresh and see what happens.

Work priorities mean I can not progress much further with this until next week but if I get it working I will post what has happened for everyones information.

Any other suggestions will be much appreciated!

BH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top