Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 20th, 2007, 08:59 AM
Authorized User
 
Join Date: Dec 2003
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default report problems

My report is very large I set left margin10 right margin 10 top 0 bottom 0 paper size is A4 size in page setup now I want three page report how should I make the three page report in report design

Mohamed Mohiddin
Officer
__________________
Mohamed Mohiddin
Officer
 
Old August 21st, 2007, 07:37 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I think what you want is the Page Break tool. There is a button for it.
It sounds like you have 3 pages of consistent data, and you want to make sure it scrolls through three pages every time. I would lay out one large details section, and then add page breaks in the details section. I think this will print your page headers and footers still, so you will want to insert the page breaks and see how it looks.

Did that help?

mmcdonal
 
Old August 23rd, 2007, 11:21 AM
Authorized User
 
Join Date: Dec 2003
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your replay and one more things I have one password form in that one command button, one combo box now my problem is when I click the button if password is correct show the combo box after when I selecting from the combo box the particulars forms or report etc should to open otherwise should not show all things. How should I to do

Mohamed Mohiddin
Officer
 
Old August 23rd, 2007, 01:13 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am not sure I understand your requirement here. Is it that you want the combo box to be invisible until the proper password is submitted? If so, I would have two forms, one to enter the password, and one to display the form with the combo box. If that is not possible, then just set the combo box to Visible = No, and then on the on click event of the button, check the credentials (either in a table or plain text) and then set the combo box to visible or not based on the response. For example, assume your text box is Text1, the combo is Combo1, and the password is password:


Dim sString As String

If IsNull(Me.Text1) Or Me.Text1 = "" Then
   MsgBox "Please enter a password.", vbCritical
   Exit Sub
Else
   sString = Me.Text1
End If

If sString = "password" Then
   Me.Combo1.Visible = True
Else
   Me.Combo1.Visible = False
End If

You can also nest these conditionals, but you don't save much here.

The combo can be prebuilt and its recordsource prebuilt and just sit on the form invisible until the proper password is entered.

If you have other requirements, please post.




mmcdonal
 
Old August 25th, 2007, 09:08 AM
Authorized User
 
Join Date: Dec 2003
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks once again actually my password forms is in startup, now my problem is when I click the button if password is correct show the all table, form, report etc otherwise to be close the application. How should write the code

Mohamed Mohiddin
Officer
 
Old August 27th, 2007, 06:45 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Hi,

   Depending on how you are checking the password, you would add this code to close the application:

If sString <> "password" Then
   Application.Quit
End If

DoCmd.OpenForm "frmMyMainForm"

etc.

Just check to see if the proper password was entered. If not, then close. Then the code will move on to the next section if the conditional is sString = "password" in this case.

Did that help?




mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with single page excel report psoma.cse J2EE 0 January 22nd, 2008 04:07 PM
Report Problems Brendan Bartley Access 0 February 21st, 2007 07:08 AM
Problems refreshing Report dllorca ASP.NET 2.0 Professional 0 November 13th, 2006 05:49 AM
Data Report problems jeffcflam Pro VB 6 0 June 22nd, 2006 01:39 PM
Report Problems Brendan Bartley Access 2 June 8th, 2006 08:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.