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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Argument 2

Status
Not open for further replies.

Jackie

MIS
Feb 9, 2000
148
0
0
US
What is the cause of the "Invalid Argument" error?

We have a split data base. The front-end is on the user's c:\ drive. The backend is on a network server. The user has full access to the directory and folders where the backend is stored.

Suddenly, the application is displaying an "Invalid Argument" error when the user selects a button.

I created a "test" button and received the same error.

Thanks in advance.

-Jackie
 
have you changed anything?
can you run the query/table/whatever manually without the button? does it work or not?

arguement can be i.e. query criteria. are users required to fill in any info on the form before hitting the button?

what is code behind the button?
 
Thank you. The message appears when the query is run. I think the problem may be when with the tables linked in the backend .mdb.
 
can you open/view the tables directly from the database window?

 
This message is displayed when viewing the data tables,selecting a column (especially date fields), and selecting the sort icon.

 
yes. I checked the references.

I have been able to run a previous version without error.

Is it a safe assumption that the data tables are corrupt?
 
i guess i should have asked first if you have compacted and repaired both front- and back-ends. duh.
 
Yes. However, an error is generated on the backend and displays a window asking if the error should be sent to microsoft.
 
obviously bad corruption....try 1) calling your server admin who should have a backup from the day before this started happening. if that doesnt work, then 2) try making a new blank db and importing in the objects from the 'bad' db. maybe do one at a time and open each after importing to see if it works ok before proceeding. unless you know which one is the culprit.
 
Jackie, GingerR and danvlas have done a lot of work for you. They each deserve a star.

danvlas, your answer helped me!

GingerR, you've convinced me never to use a network!

Judge Hopkins


There are only two rules for success: (1) Never tell everything you know.
 
judge check this faq. i put this code in every db i write and it launches on startup of db, so i never have to worry about references. it does the same thing as above, but automatically: faq181-936

also i only use servers cause it's the rules in my company. you cannot house a db on a pc in case of blowout. having backups should be a normal way of doing business. there have been two or three times i've need to call help desk to get last night's db copied cause i've had corruption. a little data is lost but otherwise the process runs smoothly. who knows why jackie's data got corrupt in the first place. many possible reasons: improper record locking, user machine blue-screened with db open...i've found that all corruption is my fault or "no one's" fault (pc bombs), not the server's. anyhow, my two cents' worth.

thanks for the kudos tho........
 
I think that I narrowed the problem to a specifc table.

When I attempt to import the table to a new database, the "Microsoft Jet DB engine stopped the process because you and another user are attempting to change the same data at the same time".

since I am working off of a harddrive, no other users can be accessing the data.
 
after you fix this up....make sure you have record-locking set up properly. default is No Locks. you might want to make it Edited Record if it isn't already.

otherwise...dont know exactly why else this would happen. you'd have to ask users exactly what they were doing at the time of the honked-upness. usually i can't build a good reason, just fix the immediate problem and move on. this kind of think has only happened to me twice in all my years.

do you have a backup of the data? if not you might want to create something that automatically saves a copy of the backend db every night. then at least you only loose a few hours' worth of data.
 
Ginger: I read the FAQ, then I went to MSKB site to read the code. This is what puzzles me:

strPath = .FullPath
'It gets the path from the broken reference
With Access.References
.Remove loRef

.AddFromFile strPath
'Maybe that's why it was broken: no such path. Resume Next? That doesn't fix it...
End With

Otherwise, it's a nice thingy and could be improved (just as many other MS gadgets):

On Error GoTo ErrHandler and test each error code in a Select Case sequence. If the path is wrong, but the referenced program/dll exists on user's computer, get strPath from an Open dialog.

judgehopkins: thanks for appreciation. But don't give up on using a network, as you put a hard limit on Access possibilities. It is not the perfect database - compared to SQL Server or Oracle, but it still can do a lot of nice tricks.

Cheers,



[pipe]
Daniel Vlas
Systems Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top