Senin, 03 April 2017

Re: [MS_AccessPros] Page Break question or something else

 

Jim-


I just tried the sample form you uploaded, and it works just fine opening from the Navigation Pane.  Works better if you're not using tabbed documents.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Apr 3, 2017, at 8:29 PM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



Jim-

That article says you must always supply the page number and optionally the offsets.

Have you tried setting a stop in the code and then stepping through to see what it does?

I have no clue why it works when switching from Design view but not when just opening the form.  Perhaps there is code in some other event procedure that is interfering with it.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Apr 3, 2017, at 8:08 PM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



John,
What is the most frustrating thing is that if I go to design view and then to form view it works perfectly. It is like something is forcing the form to use different twips or Hey I do not know. I am confused at this point. Let me know if you want me to post the database.


Jim Wagner


On ‎Monday‎, ‎April‎ ‎03‎, ‎2017‎ ‎04‎:‎05‎:‎54‎ ‎AM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Hi John,

Great article, I was using this link for help to get where I am now. https://msdn.microsoft.com/en-us/library/office/ff197662.aspx

I tried putting just the page number and it does not work. I tried the offsets both without the page number and with. I received an error that stated that I was missing the page. Is there a setting or something that is messing me up? I can post the database to the files for you to look at. it is just the form. the buttons do not open any reports. Just the header buttons that gotopage on the form.



Jim Wagner


On ‎Monday‎, ‎April‎ ‎03‎, ‎2017‎ ‎03‎:‎04‎:‎39‎ ‎AM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
 

Jim-


Read this article:


DoCmd.GoToPage is obsolete.  You should be using Me.GoToPage.  Also, you should provide either the page number OR the offsets, but not both.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Apr 3, 2017, at 6:23 PM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I am still trying to get this working. I do not know why it only works if I open the form in design view and then open it in Form view. I thought it was a button getting the focus, but I changed the load event to put the focus on a button on the form header. But that did not change a thing.



Jim Wagner


On ‎Thursday‎, ‎March‎ ‎30‎, ‎2017‎ ‎02‎:‎32‎:‎36‎ ‎AM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

So I have a new question.
If I open the database and try the buttons to move to the page break, it does not work. It moves to a random location. But, then I open it in design view and go back to the form view, it works perfectly. So the code works but not until the form is in design view and then in form view. 

Jim Wagner


On ‎Monday‎, ‎March‎ ‎27‎, ‎2017‎ ‎09‎:‎42‎:‎33‎ ‎AM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
 

Liz,

I see what you are doing. But I do not have any subforms, just buttons. The set focus just puts the focus on the control. If the control is close to another section, nothing moves but puts the focus on the control.



Jim Wagner


On ‎Monday‎, ‎March‎ ‎27‎, ‎2017‎ ‎03‎:‎08‎:‎32‎ ‎AM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
 

Liz,

Yes those are twips. I used it last year on a database with many different steps for the users. I used the twips location to just move the information label and change the caption on the form for each step as the users moved through the form. It reduced the amount of objects on the form.

So I have buttons on the Form header so the buttons stay in the same place. So the code I sent is for those buttons on the header to navigate to the location on the form where the section is of buttons to open reports.


Jim Wagner


On ‎Monday‎, ‎March‎ ‎27‎, ‎2017‎ ‎02‎:‎54‎:‎51‎ ‎AM, Liz Ravenwood liz_ravenwood@beaerospace.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
 

Jim, I'm not familiar with this GoToPage with the arguments here.  Does that tell you to set a focus somewhere on the form?  If so, I would think so.  I had some forms where they were long and would shift up and the heading info and top part of the form would be out of sight, so this was recommended to me.  Bill Mosca I believe.  It was quite effective.

 
 

You could either have the current event of each form do a me.txtFocus.setfocus or a public sub

 

Public sub AlignIt(frmName as form)

   frmName.txtFocus.setFocus

end sub

 

and on the current events + anywhere else the forms got shifted off you could

 

call AlignIt(me)

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] 
Sent: Monday, March 27, 2017 8:35 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: RE: RE: [MS_AccessPros] Page Break question or something else

 




Liz,

 

this is what I have now below. I had it working on Friday before I left and this morning only the first 2 work. So If I add multiple text boxes as you suggested will that be better?

 

Jim 

 
 

Private Sub cmdGoToMainReports_Click() 
DoCmd.GoToPage 8, 0, 0 
DoCmd.GoToPage 8, 0, -15900  '0.9583" 

End Sub 

Private Sub cmdGoToSalaryOverview_Click() 
DoCmd.GoToPage 8, 0, 0 
DoCmd.GoToPage 1, 0, 5699 '3.9583" '5699 

End Sub 

Private Sub cmdGoToCompRatio_Click() 
DoCmd.GoToPage 8, 0, 0 
DoCmd.GoToPage 2, 0, 8719 '6.9583" '10019 

End Sub 

Private Sub cmdGoToPositionHistory_Click() 
DoCmd.GoToPage 8, 0, 0 
DoCmd.GoToPage 3, 0, 6650 '8.625" '12419 

End Sub 

Private Sub cmdGoToJobCodes_Click() 
DoCmd.GoToPage 8, 0, 0 
DoCmd.GoToPage 4, 0, 4000 '9.7083" '13979 

End Sub 

Private Sub cmdGoToJobTitles_Click() 
DoCmd.GoToPage 8, 0, 0 
DoCmd.GoToPage 5, 0, 3420 '11" '15839 

End Sub 

Private Sub cmdGoToServiceAwards_Click() 
DoCmd.GoToPage 8, 0, 0 
DoCmd.GoToPage 6, 0, 3100 '17159 '11.9167" 

End Sub 

Private Sub cmdGoToLabels_Click() 
DoCmd.GoToPage 8, 0, 0 
DoCmd.GoToPage 7, 0, 19259 '13.375" '19259 

End Sub

 

Jim Wagner


 
 

On ‎Friday‎, ‎March‎ ‎24‎, ‎2017‎ ‎08‎:‎06‎:‎16‎ ‎AM, Liz Ravenwood liz_ravenwood@beaerospace.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

  

What has been suggested to me Jim is to have a teeny little almost 0 width 0 height text box txtFocus and then when the form is opened do a me.txtfocus.setfocus

 
 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] 
Sent: Friday, March 24, 2017 2:44 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: RE: [MS_AccessPros] Page Break question or something else

 



Liz,

 

this is what I have now, but the only one that is working is the Salaryoverview and EmployeeLabels

 

Jim

 

Private Sub cmdGoToMainReports_Click() 

DoCmd.GoToPage 8, 0, 1379 '0.9583" 

End Sub 

Private Sub cmdGoToSalaryOverview_Click() 

DoCmd.GoToPage 1, 0, 5699 '3.9583" 

End Sub 

Private Sub cmdGoToCompRatio_Click() 

DoCmd.GoToPage 2, 0, 10019 '6.9583" 

End Sub 

Private Sub cmdGoToPositionHistory_Click() 

DoCmd.GoToPage 3, 0, 12419 '8.625" 

End Sub 

Private Sub cmdGoToJobCodes_Click() 

DoCmd.GoToPage 4, 0, 13979 '9.7083" 

End Sub 

Private Sub cmdGoToJobTitles_Click() 

DoCmd.GoToPage 5, 0, 15839 '11" 

End Sub 

Private Sub cmdGoToServiceAwards_Click() 

DoCmd.GoToPage 6, 0, 17159 '17159 '11.9167" 

End Sub 

Private Sub cmdGoToLabels_Click() 

DoCmd.GoToPage 7, 0, 19259 '13.375" 

End Sub 

 

Jim Wagner


 
 

On ‎Friday‎, ‎March‎ ‎24‎, ‎2017‎ ‎07‎:‎38‎:‎54‎ ‎AM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

 

One of the databases we have was a tabbed form for many years. It became a little unstable. So we are redesigning that one also. but this database has several forms have only a few or even one button after doing a review of the needs of the controls on the forms. I think a tabbed form would just be the same thing one or two buttons on a tab.

 
 
 

Jim Wagner


 
 

On ‎Friday‎, ‎March‎ ‎24‎, ‎2017‎ ‎07‎:‎21‎:‎27‎ ‎AM, Liz Ravenwood liz_ravenwood@beaerospace.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

 

Have you considered using page tabs?

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] 
Sent: Friday, March 24, 2017 1:53 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Page Break question or something else

 
 

Hello all,

 

I have a form that is a little longer than scrolling a few times. I am combining some forms into one because of the very few buttons on several forms makes it silly to have a form with one button or just 2 buttons on it. 

 

I have been experimenting with page breaks on the form and there are some buttons to go to the page break. But it is not putting the page break at the top of the form, so the other page breaks show above it. Is there a way of getting the page break to go to the top of the form when I click the button to go to it?

 

Or is there another way of getting the form to the spot on the form to be at the top?

 

Thank You

 

Jim Wagner 

 



This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.





This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.







This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.









__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (18)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar