Locking out the very last "new" record in a form

  • Thread starter Thread starter martinmike2
  • Start date Start date
M

martinmike2

Hello,

I have a form that I use to move through my records. I do not use the
record selectors, but command buttons. What is occuring, is once I
get to the end of the recordset, I move into what I call the star
field ( the empty record at the bottom of all tables, for adding a new
record ). Since I have a new record system already established, I do
not want my users to move into this "star field"

Is there a way to prevent this behaviour?
 
martinmike2,
Set the Allow Additions to No in your form design (the default)
Since I have a new record system already established...
A brief description of that system would be helpful, but... say you have
a button for new records.
Use that event to programmatically set the Allow Additions to Yes, and
move to the new record.
Then set the Date Entry to Yes to allow the user to only add new
records, and not be able to Browse, during the "new record" session.

Another button could be used to move to the last record, set Allow
Additions to No, and Data Entry to No, and place the user back into "normal"
mode.
--
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."
 
Hello,

I have a form that I use to move through my records.  I do not use the
record selectors, but command buttons.  What is occuring, is once I
get to the end of the recordset, I move into what I call the star
field ( the empty record at the bottom of all tables, for adding a new
record ).  Since I have a new record system already established, I do
not want my users to move into this "star field"

Is there a way to prevent this behaviour?

Put the following in the Form_current event (modify button names if
req'd)

Me.cmd_first.Enabled = Me.CurrentRecord > 1
Me.Cmd_prev.Enabled = Me.CurrentRecord > 1
Me.Cmd_next.Enabled = Me.CurrentRecord < Me.Recordset.RecordCount
Me.Cmd_last.Enabled = Me.CurrentRecord < Me.Recordset.RecordCount
 

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

Back
Top