Stay on Current Record

AccessNub

Registered User.
Local time
Today, 07:02
Joined
Jul 22, 2006
Messages
71
Hi Guys,

Once again I am playing with access and have a minor issue that I'm hoping you can help me out with.

If there a setting or code that I can use to prevent people from going to a new record?

When the form opens I want it to go to a new record (done already), but after that, I don't want the user to be able to access another new record unless they close and reopen the form.

What users are doing is (accidentally) tabbing until they get to a new record and move on instead of letting the form close and open again.

Any help would be greatly appreciated.
 
this might not be the best way but...if they are tabbing to a new record then a bunch of events will fire including the afterupdate. you could add code to the afterupdate to close the form. if you have a save button this would also work. there are a lot of possibilites to consider though.

i'm pretty sure someone has addressed the 'stop users from tabbing to a new record' issue. search this forum.
 
If there will only be one added record each time they open the form then why no just set AllowAdditions false in the AfterUpdate event of the form? You can try that and see if that gives you the results you were looking for.
 
The tabbing to a next/new record action itself is controlled by the Cycle Property. Go to Properties - Other and set Cycle to Current Record. If you have the Navigation buttons set to NO and Cycle set to Current Record they can't go to a new record. But this is really a rather strange scenario, having to close a form before adding a second new record. You can set the form up to only allow additions, you know.
 
The tabbing to a next/new record action itself is controlled by the Cycle Property. Go to Properties - Other and set Cycle to Current Record. If you have the Navigation buttons set to NO and Cycle set to Current Record they can't go to a new record. But this is really a rather strange scenario, having to close a form before adding a second new record. You can set the form up to only allow additions, you know.

The form itself opens fast and out of 60 users, we only see about 100 records entered a day, so having to reopen it when they need to use it isn't that much of a problem.

I will check the Cycle Record out when I get back to work today. What I did yesterday was follow RuralGuys suggestion. Sorta.

If you set AllowAddtions to False after you open the form, you cannot save the new record you are on, but it does prevent people from cycling to a new record. So what I did was set AllowAddtions to True on the Click that the user presses to save/send the record after all the criteria has been met to do so, then the form closes. I think this will work out for me, but the Cycle Record might be less mess in the script.

Once again, you guys have been great. Thanks for the help
 
Just for the record, I suggested you use the AfterUpdate event, not when opening the form. The AfterUpdate event will occur after the first new record is saved.
 
Just for the record, I suggested you use the AfterUpdate event, not when opening the form. The AfterUpdate event will occur after the first new record is saved.

Opps, I stuck it in the wrong spot.

Thanks again
 
The tabbing to a next/new record action itself is controlled by the Cycle Property. Go to Properties - Other and set Cycle to Current Record. If you have the Navigation buttons set to NO and Cycle set to Current Record they can't go to a new record. But this is really a rather strange scenario, having to close a form before adding a second new record. You can set the form up to only allow additions, you know.

I tried this out, works fine as well.

Thanks
 
I heard somewhere that "There's ALWAYS more than one way to skin a cat!"
 
LOL! Someone once asked me "Why would you want to 'skin' a cat?" I naturally replied "Because their hair gets stuck in your teeth and it'll give you indigestion!"

When I went out the next morning to get the paper PETA was camped on my doorstep!

Of course, the fact of the matter is the neighbors used to call me Dr. Doolittle, before circumstances forced me back into renting! Now I'm down to a dog, a cat and a bird!
 
Just wanted to share.

I was tooling around with another way to do this and found a way that I think I like best.

I made a query for the table, but set the criteria to Null.

When the query opens, it has no records to display so your wheel mouse and page up/down arrows don't go anywhere but you can still save a new record.
 

Users who are viewing this thread

Back
Top Bottom