Results 1 to 7 of 7
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print Form/Hide Menu (A2K SP3)

    I would avoid printing the form. Forms are meant for editing and viewing data, not for printing; they seldom look good on paper. Another thing to consider is that if you print a form, it will print all records, not just the current one. This may not be what you intend.

    The best solution is to design a report, and print or preview that from the form; you can specify a WhereCondition to limit the report to the record currenrly displayed in the form, if desired.

    If you want to hide the standard menu bar and toolbar, create a custom menu bar and toolbar, with only the options you want the user to have, and assign tnem to the Menu Bar and Toolbar properties of the form (in the Other tab of the Properties window).

  2. #2
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Form/Hide Menu (A2K SP3)

    The form is currently being printed by using File, Print and is satisfatory to the users. The problem is they don't want the DepositRefundAmt to be posted unless the form has been printed. The form calls up a single record so when you print the form, only one record is printed. In all other cases, I have created a report to do the job but in this particular case I want to be able to print the form, if possible.

    The posting of the DepositRefundAmt is currently being accomplished by using an On Unload event. Maybe there is another way to prevent the update unless the from is printed.

    Tom

  3. #3
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print Form/Hide Menu (A2K SP3)

    I have a frmSecurityDepositRefund on which I have placed a Print Form button in the form header. I want to hide the menus and icons to prevent the user from being able to print the form except by pressing the Print Form button. If the from is printed, I then want to add some code to update certain fields:

    If <!t>[trfDepositCheckBox]<!/t> = -1 Then
    Me.DepositRefundAmt = 999
    Else: Me.DepositRefundAmt = Me.NetDepositAmt
    End If

    And then restore the menus and icons.

    Assistance with the print, hide and restore syntax in the On Click event would be appreciated. I how to print a report but can

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print Form/Hide Menu (A2K SP3)

    You can still create a custom menu bar and toolbar and use those in the form, to hide the built-in versions. Your command button can print the form (DoCmd.PrintOut), then update DepositRefundAmt.

  5. #5
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Form/Hide Menu (A2K SP3)

    I have gotten the Print function to partially work. Is it possible not to print the form header when printing the form or to print just page 1 of the form. When the from header was added, it now prints out a blank page 2.

    In designing the custom tollbar, I went to View, Toolbars, Customise and was able to unclick Form Design and Fromatting (Form/Report). I tried unsuccessfully to uncheck the Menu Bar to hid it totally. Alternatively, I also could not fingure out how to delete the Print functions from the File Menu.

    Tom

    Tom

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print Form/Hide Menu (A2K SP3)

    1. Open the form in design view.
    Click on the form header.
    Activate the Format tab of the Properties window.
    Set the Display When property to Screen Only.

    2. Don't try to hide or modify the built-in menu bar and toolbars for this purpose. Create a custom menu bar and toolbar, and assign their names to the Menu Bar and Toolbar properties of the form. Access will automatically hide the built-in ones when the form is opened, and redisplay them when the form is closed.

  7. #7
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Form/Hide Menu (A2K SP3)

    Many thanks for your assistance. Everything if working great.

    Tom

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •