Disabling record navigation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings,

I have a form, which is entered into via a macro with the parameter set to
'Add'. While this prevents my user from being able to look at prior records,
for some reason they are able to scroll through all new records created
during from the time they first open the form. This can be accomplished
either through the 'Page up/down', or though a mouse wheel.

How can I disable this ability? This is a 'Cash Register' style of a program
for a charity boutique, with users that are not very computer literate, and I
want to avoid accidental record modifications.

Thank You,
dkb
 
When finished with the record make sure that
-- the form is closed (record is saved)
-- the form is reopened (ready for new input that is ..)

You can do this with a macro or with code.

Arno R
 
dkb said:
Greetings,

I have a form, which is entered into via a macro with the parameter
set to 'Add'. While this prevents my user from being able to look at
prior records, for some reason they are able to scroll through all
new records created during from the time they first open the form.
This can be accomplished either through the 'Page up/down', or though
a mouse wheel.

How can I disable this ability? This is a 'Cash Register' style of a
program for a charity boutique, with users that are not very computer
literate, and I want to avoid accidental record modifications.

Thank You,
dkb

Base the form on a query like...

SELECT *
FROM TableName
WHERE 1 = 0

The criteria (being impossible to satisfy) will always open at a blank RecordSet
just like using the "Add" option of OpenForm. The difference though is that you
can issue a Requery in the AfterInsert event of the form and even the record
they just entered will be removed from the form with no method for them to get
back to it.

You could just set DataEntry to true in the AfterInsert event to do the same
thing, but a form in DataEntry (or Add mode) can display all records in the
table just be using "Remove all filters" from the menu bar. A form with an
impossible criteria will never display an existing record no matter what the
user does.
 
dkb,
I think what you call "Add" is just opening the form to a new record.
What you need to do is set the form's DataEntry property to True.
Private Sub Form_Open(Cancel As Integer)
Me.DataEntry = True
End Sub
 
Back
Top