OpenFormToExistingRecord

K

Kassie42

Hello,
I have Access 2007 w/Windows Vista. I have created a database and I am having
several problems. When I open my form it opens to a new record only. I set up
command buttons on the new record so that I may hide my toolbar. The command
buttons jobs are to go to the first or last record or to find an existing
record. (I should mention I have a subform within this form. ) The command
buttons do not work. The only way I can view all my records is to select the
sort button on the toolbar, therefore making it impossible to hide. I also
tried setting a macro to open my form to the first or last record, but this
fails as well. My command buttons do work after I select the sort button
and make the records visible. Does anyone know if there is a way to make my
buttons or macros work or make all the records visible when opening the form?
I am not sure if it is a bug with 2007 and or Vista or not.

Thanks so much,
Kassie
 
M

Maurice

Hi Kassie,

By default the macro's are disabled in 2007. You have to set permissions to
use the macro's in your db. Try adjusting the macrosettings under:Office
button-> Access Options -> Trustcenter - button trustcenter settings -> Macro
settings..

hth
 
K

Kassie42 via AccessMonster.com

Thank you. I changed the settings to run digitally signed macros. I am able
to run my macros now with one exception. When I first open my database it
opens to a blank record. My macros will not work unless I select the sort
button and bring up an actual record. When an actual record is up (for
instance-John Doe) then I can run my macros. Do you have any suggestions on
how to open my database to an active record or how to get a macro to work on
a blank record? Thanks so much.
Hi Kassie,

By default the macro's are disabled in 2007. You have to set permissions to
use the macro's in your db. Try adjusting the macrosettings under:Office
button-> Access Options -> Trustcenter - button trustcenter settings -> Macro
settings..

hth
Hello,
I have Access 2007 w/Windows Vista. I have created a database and I am having
[quoted text clipped - 12 lines]
Thanks so much,
Kassie
 
L

Linq Adams via AccessMonster.com

Going to a new record when a form opens is not the default behavior in Access,
at least not up thru v2003. I suspect that this holds true for v2007, as well,
although with Microsoft, anything is possible. Which means that, possibly
inadvertently, you've probably instructed Access to open to a new record, and
you need to figure out how you've done this and correct it.

One way to do this is to set the form's Data Entry property to Yes. I don't
think this is what you've done, because it ***only*** allows for new records
to be entered. You can't ***view existing records at all*** if this property
is set to True, which you state you can, after sorting the records.

Another way to accomplish this, if your form is being opened from another
form, is to instruct Access to open to a new record with code like this

DoCmd.OpenForm "YourFormName", , , , acAdd

Lastly, in the form's OnLoad or OnOpen event, it can can do it with code like
this:

Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
End Sub

I suppose, in this last instance, you could have a macro called from the
OnLoad or OnOpen event that instructs Access to do this, so if you have a
macro in either of these places, you'll need to check them out as well.

Good luck!
 
P

Pete D.

One other possiblity is it isn't opening in add mode but filtered. Access
2007 has a habit of a sticky filter. Look at the bottom of your form and
click the button that says filter and see if it goes to normal. If so open
the form in design mode, clear the sort by and set open filtered to no.
Save it and close it. Now try opening it normally and see if it goes away.
I haven't figured out yet what causes this but have started watching for
this behavior to see if I can find a pattern.
 
K

Kassie42 via AccessMonster.com

Yes! You were correct. I can't thank you enough!

Kassie
One other possiblity is it isn't opening in add mode but filtered. Access
2007 has a habit of a sticky filter. Look at the bottom of your form and
click the button that says filter and see if it goes to normal. If so open
the form in design mode, clear the sort by and set open filtered to no.
Save it and close it. Now try opening it normally and see if it goes away.
I haven't figured out yet what causes this but have started watching for
this behavior to see if I can find a pattern.
Going to a new record when a form opens is not the default behavior in
Access,
[quoted text clipped - 31 lines]
Good luck!
 
P

Pete D.

Glad I could help, if you find it happen again and a sequence of events I
would be curious to know. Thanks Pete D.
Kassie42 via AccessMonster.com said:
Yes! You were correct. I can't thank you enough!

Kassie
One other possiblity is it isn't opening in add mode but filtered. Access
2007 has a habit of a sticky filter. Look at the bottom of your form and
click the button that says filter and see if it goes to normal. If so
open
the form in design mode, clear the sort by and set open filtered to no.
Save it and close it. Now try opening it normally and see if it goes
away.
I haven't figured out yet what causes this but have started watching for
this behavior to see if I can find a pattern.
Going to a new record when a form opens is not the default behavior in
Access,
[quoted text clipped - 31 lines]
Good luck!
 
K

Kassie42 via AccessMonster.com

Will do.
Pete said:
Glad I could help, if you find it happen again and a sequence of events I
would be curious to know. Thanks Pete D.
Yes! You were correct. I can't thank you enough!
[quoted text clipped - 15 lines]
 
K

Kassie42 via AccessMonster.com

Hi Pete,
I just wanted to report a "sequence of events". I spoke to soon. I was able
to bring up an active record when opening my database, but when I have active
records I can't bring up a new record. I expect this is a quirk in the system
as I did not have this problem using prior versions of access. I reverted to
my saved version and decided just to give up and use the old one. :)

Thanks for trying to help though.
Kassie
Will do.
Glad I could help, if you find it happen again and a sequence of events I
would be curious to know. Thanks Pete D.
[quoted text clipped - 3 lines]
 
Top