Navigation Buttons

This is becoming so confusing to me that I don't know what I'm doing right or wrong. I am getting so many errors now.

These navigation buttons are on the sub form. When I navigate through my main form I get the error

Run-time error 3021
No current record

It highlights Me.RecordsetClone.MoveLast from the Private Sub Form_Current()

The more I try to understand it so that I can troubleshoot the more confused I get. If i need to send the db let me know.

GH I tried it with your code and got the same problem.
 
Sara,
It would be easier to assist if we had a copy of your db.
 
Attached is the DB.

The main form is frmTONumber. The subform is frmTOItems.

(Tables tblTONumber and tblTOItems)
 

Attachments

Sara,
I hope you have been making backup's. What I downloaded has a major problem that I can't fix yet. Corruption of some sort I fear. I'll try and download again.
 
What kind of problem did you get? Did the db not open?
 
It opens and then after about 5 seconds comes up with "Access has encountered a problem and need to close" (and send a report) and then I'm history!
 
RG:

I did the compact and repair and zipped it up again.

That was the same error that I got if I saved the database at home and tried to work on it at work or vice versa.

Then I followed your advice on how to get it working again and it worked.
 

Attachments

I'm sorry Sara but I can't get past the error. Have you tried these suggestions? Especially the decompile.
 
I get a message when I open it too but then I can open any forms I want to. See attachment
 

Attachments

  • Image1.jpg
    Image1.jpg
    67 KB · Views: 164
No problem. I figured there was a misunderstanding somewhere. From my experience... you have to protect the data from the user. The user should be prompted and asked "are you sure you want to do that" because they might have modified a record withour realizing it. It that happens and you do not trap if the record is Dirty before moving the focus off of the current record then Access will save that record [whether the user indended to do that or not]. I always trap if the record is dirty before I allow the user to do anything. I prompt the user that the record has been modified and I give them the choice to either Save, Undo or do nothing but I do not allow them to leave a record if it is dirty.

Check these links out for you will see how easily I accomplish that.

A better mouse trap?

Enable/Disable The Control Box X Button

Good luck!
 
As long as I keep the <SHIFT> key down it does not error out. I renamed the AutoExec macro and still get the error. As soon as I let go of the shift key I get the hourglass and then the error.
 
I tried out all of the suggestions RG. Attached is the database again. This is a secured database so in addition I added the .mdw file and shortcut.
I have it where depending on who logs on they get a different main menu form.

You can log in as ychebaro14 password Diana that one has all the rights.

The startup form you can exit that and from there you can click on the frmTONumber which is the main form.
 

Attachments

Last edited:
Its acting up for me now too. First I tried to import everything into a new DB and got "Cannot complete transaction. Too many nested transactions" (or something close to that) when importing forms.

I deleted the Autoexec and still not working correctly. Sounds corrupted like you said :mad:

edit:
Posted this before seeing your last post Sara. The newest attachment seems the same as the other to me....
I am gone! Good luck with this :)
 
Last edited:
ghudson I appreciate your input. I like your method so that users don't modifiy records unintentionally.

If the record is dirty mean the record has changes to it correct? What you said makes a lot of sense.


I did try to use your code. I added a save button to my form and when I click on the Save button I get an error. In debug mode it highlighted MessagePrompt under bSave_Click()

And it wouldn't let me go any further
 
That's strange that it is only opening up for me. Which makes me scared because if I take this db home to work on it that means I'm going to run into this problem that you all are.
 
I have modified [corrected] the Save button code I posted near the beginning of this thread. Now try it!
 
I can open your Access 2000 TechOrder.mdb [with Access 2003] up ok using your custom User ID and password with your workgroup file. But you have not compiled your db. I just did it and it is okay. You must be working in a very high resolution for your form is huge on my 800x600 monitor at home.

I have to admit that I dislike your use of the form within a form [subform] for all of the forms objects. I think that your problems would cease if you just used the frmTOItems form as the main form instead of embedding it in the frmTONumber form. Personal opinion of course!

I was working on an updated version of my A better mouse trap? for I was adding custom naviagation buttons to the main form and the subform just for a quick demo. I will post it in this thread on Monday.

For those following along, just change the shortcut target to this to easily open the db. You will have to change the below string to match where you saved the files on your computer!

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /WRKGRP "C:\TechOrder\Secured.mdw" "C:\TechOrder\TechOrder.mdb" /user ychebaro14 /pwd Diana
 
Last edited:
Thanks gh for the assistance in getting the secured mdb open. I would still be hacking around. I happen to have the runtime package for ac2003 on my system and the mdb opens just fine with your shortcut. Of course I can't exit to anything but Windows since it is a RunTime package. My full ac2002 does *not* like very well. It opens for a second and then wants to send Bill Gates a failure report. It probably has something to do with the fact that the mdb was secured with ac2003 and it throws ac2002 for a loop. I'm giving up for now. If I continue to assist on this thread it will have to be with my psychic ability to see the code.

Sorry Sara, but I'll keep watching and pitch when I can.
 
Last edited:
GH:

Yes I am working on high resolution: 1280 by 1024. That is the resolution on all of the computers at work.

GH, I am open to ideas about the DB. You said that you dislike my form within a form. That was the only way I could think of doing it. I can't make frmTOItem as the Main form because on frmTONumber those fields are the static fields which will stay the same but you can have more than one Item (all the fields in frmTOItems). That's why I did it that way.

I'll be looking forward to that mouse trap on monday.

Thanks for the help.
 
RG:

Thanks for all of your help and input. I truly appreciate. :)
 

Users who are viewing this thread

Back
Top Bottom