A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

maintaining current record when changing focus in forms



 
 
Thread Tools Display Modes
  #1  
Old July 14th, 2006, 07:37 PM posted to microsoft.public.access.forms
Rob
external usenet poster
 
Posts: 1,029
Default maintaining current record when changing focus in forms

I am creating several forms in Access that will be tracking documents that
are emailed to certain distribution groups. I will be creating security for
these different groups but my question doesn't to do with that as yet. I am
wondering that when I create macros that move from form to form and a form
gets minimized, how to bring that form back up at the current record. So fo
instance I am on record number 50 on my Transmittal Form and I swith to the
Approvals form in a macro and when the macro is complete it brings the
Transmittal Form back up. I want the transmittal form to remain at record
50. Currently it goes back to the first record. Any help would be
appreciated.

Thanks in advance,

Getting Better at Access
  #2  
Old July 18th, 2006, 12:34 AM posted to microsoft.public.access.forms
Michel Walsh
external usenet poster
 
Posts: 2,404
Default maintaining current record when changing focus in forms

Hi,



"Remember" the value of the primary key ( in a global variable) before
calling the subroutine (or as first thing done in the subroutine) and, once
back, "find and go to" the record with that value you previously saved.


Hoping it may help,
Vanderghast, Access MVP


"Rob" wrote in message
...
I am creating several forms in Access that will be tracking documents that
are emailed to certain distribution groups. I will be creating security
for
these different groups but my question doesn't to do with that as yet. I
am
wondering that when I create macros that move from form to form and a form
gets minimized, how to bring that form back up at the current record. So
fo
instance I am on record number 50 on my Transmittal Form and I swith to
the
Approvals form in a macro and when the macro is complete it brings the
Transmittal Form back up. I want the transmittal form to remain at record
50. Currently it goes back to the first record. Any help would be
appreciated.

Thanks in advance,

Getting Better at Access



  #3  
Old July 18th, 2006, 02:24 AM posted to microsoft.public.access.forms
Rob
external usenet poster
 
Posts: 1,029
Default maintaining current record when changing focus in forms

I don't think that will do it. How would write the code to tell it to go to
the last record that was there. It may not be the last record saved for the
user has the option of searching for a record, then emailing it through a
macro and the macro is to bring the form back up only at the last known
record.

See what I mean. I don't know how to do this through the interface so if
you would help with the code, i'd be forever in your debt. (lol)

Thanks again,

Getting Better at Access

"Michel Walsh" wrote:

Hi,



"Remember" the value of the primary key ( in a global variable) before
calling the subroutine (or as first thing done in the subroutine) and, once
back, "find and go to" the record with that value you previously saved.


Hoping it may help,
Vanderghast, Access MVP


"Rob" wrote in message
...
I am creating several forms in Access that will be tracking documents that
are emailed to certain distribution groups. I will be creating security
for
these different groups but my question doesn't to do with that as yet. I
am
wondering that when I create macros that move from form to form and a form
gets minimized, how to bring that form back up at the current record. So
fo
instance I am on record number 50 on my Transmittal Form and I swith to
the
Approvals form in a macro and when the macro is complete it brings the
Transmittal Form back up. I want the transmittal form to remain at record
50. Currently it goes back to the first record. Any help would be
appreciated.

Thanks in advance,

Getting Better at Access




  #4  
Old July 19th, 2006, 10:15 AM posted to microsoft.public.access.forms
Michel Walsh
external usenet poster
 
Posts: 2,404
Default maintaining current record when changing focus in forms

Hi,



One possible solution is:


Me.RecordsetClone.FindFirst "PrimaryKeyFieldNameHere=" &
globalVariableNameHere
Me.Bookmark= Me.RecordsetClone.Bookmark


assuming the primary key is numerical; if it is a text value, would be:

Me.RecordsetClone.FindFirst "PrimaryKeyFieldNameHere=""" &
globalVariableNameHere & """"

I also assume globalVariableNameHere is the variable into which you saved
the primary key value, before.

Hoping it may help,
Vanderghast, Access MVP


"Rob" wrote in message
...
I don't think that will do it. How would write the code to tell it to go
to
the last record that was there. It may not be the last record saved for
the
user has the option of searching for a record, then emailing it through a
macro and the macro is to bring the form back up only at the last known
record.

See what I mean. I don't know how to do this through the interface so if
you would help with the code, i'd be forever in your debt. (lol)

Thanks again,

Getting Better at Access

"Michel Walsh" wrote:

Hi,



"Remember" the value of the primary key ( in a global variable) before
calling the subroutine (or as first thing done in the subroutine) and,
once
back, "find and go to" the record with that value you previously saved.


Hoping it may help,
Vanderghast, Access MVP


"Rob" wrote in message
...
I am creating several forms in Access that will be tracking documents
that
are emailed to certain distribution groups. I will be creating
security
for
these different groups but my question doesn't to do with that as yet.
I
am
wondering that when I create macros that move from form to form and a
form
gets minimized, how to bring that form back up at the current record.
So
fo
instance I am on record number 50 on my Transmittal Form and I swith to
the
Approvals form in a macro and when the macro is complete it brings the
Transmittal Form back up. I want the transmittal form to remain at
record
50. Currently it goes back to the first record. Any help would be
appreciated.

Thanks in advance,

Getting Better at Access






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.