moving through forms

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

Guest

I'm new at this so need basic instructions. When I open the form it starts a new record and allows me to add new records. I cannot access records that existed before I opened the form at this time.

I also don't want to open on a new record, but on the last record.

Can you help?
 
See below.

robbie said:
I'm new at this so need basic instructions. When I open the form it
starts a new record and allows me to add new records. I cannot access
records that existed before I opened the form at this time.

Sounds like you have the data entry property of the form set to yes. Just
change this to no.
I also don't want to open on a new record, but on the last record.

Do you mean you want the form to open and show the last record or do you
want to only be able to add a new record when you are on the last record?
Can you help?

Kelvin
 
Thanks for responding. You're right, it was the data entry property. I would like the form to open on a new record.

I've run into another problem. I don't want the user to be able to go back and change existing records. I have allow edits and allow deletions set to no, but I can still go in and change old records. Can you help me with this one?

Thanks.
Robbi

----- Kelvin wrote: ----

See below

robbie said:
I'm new at this so need basic instructions. When I open the form i
starts a new record and allows me to add new records. I cannot acces
records that existed before I opened the form at this time

Sounds like you have the data entry property of the form set to yes. Jus
change this to no
I also don't want to open on a new record, but on the last record

Do you mean you want the form to open and show the last record or do yo
want to only be able to add a new record when you are on the last record
Can you help

Kelvi
 
If these properties are as you say, then you should not be allowed to make
changes. Check to see if there is something changing these properties
through code. To get the form to open to a new record add the following
line to the OnOpen event of the form.

DoCmd.GotoRecord, , acNewRec

Let me know if you find anything.

Kelvin

Robbie said:
Thanks for responding. You're right, it was the data entry property. I
would like the form to open on a new record.
I've run into another problem. I don't want the user to be able to go
back and change existing records. I have allow edits and allow deletions
set to no, but I can still go in and change old records. Can you help me
with this one?
 
Thanks, that code did what I needed.

We've determined the macro I have is causing the conflict with AllowEdits. From OnCurrent, I am setting 7 or 8 field values in this particular form (reason being I want to be able to send this whole package on without me to the next people, next project, different values). So the only Action I am using in the macro is SetValue. How do I reset AllowEdits after the macro runs?

Robbie
 
Once you cahnge the properties of the form, they stay that way until you
change it again. Plus they can only be changed while the form is open. You
could create global variable to keep track of the AllowEdit property. You
could set this in the OnOpen event, then on the OnClose event set the
property back to what it was.

Kelvin

Robbie said:
Thanks, that code did what I needed.

We've determined the macro I have is causing the conflict with AllowEdits.
From OnCurrent, I am setting 7 or 8 field values in this particular form
(reason being I want to be able to send this whole package on without me to
the next people, next project, different values). So the only Action I am
using in the macro is SetValue. How do I reset AllowEdits after the macro
runs?
 
Thank you so much for your help. What I ended up doing is using the default value in properties and getting rid of my macro altogether. I can just pass on my notes to the next group as to what default values they need to change for the next project.

Robbie
 
Back
Top