Re: Edit Current Record Only



Tim

If you can't change the "source" for your form, then yes, you are... but you
can EASILY change the source!

Create the query on the table. For testing purposes, use a single row's ID
as a selection criterion in the query.

Open the form in design view. Open the form's properties and find the
source -- change it from the table to the query.

Now open the form -- you should only see the one record that the query had
as the selection criterion (for rowID).

To make this work, add an unbound combo box (the header is a good location)
to the form in design view. Make the source of the rows in that combo box a
query that returns rowID, and something the users will be able to recognize
and pick, then make the first column (rowID) have a column width of zero(0).

In the combo box's AfterUpdate event, requery the form with something like:

Me.Requery

The net effect is that when you open the form, nothing's in the combo box,
so the query that feeds the form has nothing in the criterion, and returns
nothing. When you pick an item (row) in the combo box, the AfterUpdate
event tells the form to re-query itself, now finding the one row/record that
had been picked.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Tim" <Tim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:56A16D53-B4C9-433F-B4E5-F3E499DA71F9@xxxxxxxxxxxxxxxx
Jeff, thanks for your quick reply.

Basicly, what you are saying is since I built the forms from the tables
and
not from update queries, I am out of luck?

"Jeff Boyce" wrote:

Tim

If you want a form to only display a single record for editing, you have
to
tell Access which record. If you tell Access the form can see ALL the
records in the table, then you will be able to see (and edit) ALL the
records.

If you use a query to "fill" the form, you can specify in the query that
it
only returns the record you wish to see/edit. You do this by using the
Selection Criterion.

Regards

Jeff Boyce
Microsoft Office/Access MVP


"Tim" <Tim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F6E22EE2-ECAE-49C5-AF8E-C47B5EEF24E4@xxxxxxxxxxxxxxxx
Hello,
I have a DB that contains 18 forms. The user populates one form at a
time
and clicks a continue button at the bottom to move to the next form. I
have
a query running when they click the next button that pulls the Branch #
and
Date and populates the next Form. All that seems to works fine, except
that
it gives the user the option to add and edit other records beside the
one
they are adding. With the way the mouse wheel scrolls through records,
I
can
see the wrong records being edited.

I tried setting the Data Entry to YES, but this bypasses the last
record
that has the Branch # and Date from the query that ran and only shows a
blank
form. I am using the acLast command to jump to the last record on each
form.

Is there a way to go to the last record and lock out all pervious
records
and the option to add records?

Thanks.






.