Disabling Navigation

G

Guest

Hi All,

I want,

1. disable any type of navigation (PageUp PageDown, Enter, Tab Button Etc.)
on my Access form
2.when I open the form its open in add mode i.e. all the feilds of form
remain blank.
3.After clicking the save button a msg box appears and ask for saving data
"yes or No" in both the cases hide all the data after click "yes or no"
 
A

Al Campagna

Abdul,
Well, not sure what you mean by Add Mode. I think you mean DataEntry
mode, and that should accomplish most of what you want to do , by itself.

In Data EntryAdd mode, the user can not acess any previous records...
only enter data into a new record, an then move to another new record
..
1. If you feel you must kill all your navigation buttons, you'd have to
use the Key Preview and Key Press to cancel those keys.
But, those keystrokes all have legitimate uses within an individual
record. Since Add mode doesn't allow browsing... there should be no
"critical" need to
disable commonly accepted navigation keys. Particularly the Tab key which
is universally used to But... that's your call...
*(also... realize that if the form's Cycle property is set to
Current Record, you won't be able to Tab to the next new record.)
2. Data Entry mode only allows adding new records, so... if you don't
have Default values for any fields... you'll only see blank fields.
3. Placing a button on your form that triggers a...
DoCmd.GoToRecord , , acNewRec
will Update the current record, and move to a new record.

Why don't you just try the DataEntry mode, and see if that works for you,
and only defeat navigation if you still feel you have to.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
G

Guest

Dear Campagna,

Thanks for your reply, I try your technique & its really works thank you
very much, Now I have an other question for you, I want that when I update
record its shows to grid control under the form so a user can't a navigate
the record but looks all the record in Grid control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top