Search results

  1. S

    PreviewTwoPages only when data is present

    Hi, When you put a condition before the action in your macro, you can count the number of items in the recordsource of your report (when it's a query). I.e.: DCount("*";"QueryReport")>0 QueryReport is the name of the query on which your report is based. Now you say that the Count of items in...
  2. S

    Only print part of a report

    Yes, there's going something wrong ;) Delete the very first line (Private Sub Report_Page() )
  3. S

    auto-size width or Label or Text Box

    Try pressing F2 when the cursor is in a textbox. In code it is: DoCmd.RunCommand acCmdZoombox
  4. S

    put cursor on position in textbox VBA

    I can't test it in Access 2000, but in Access XP it works fine
  5. S

    Only print part of a report

    1. The code-module. Select the property "On Page" on the 'Events'-tab of the Report's properties. There select '[Event procedure]' from the dropdownlist. After that, press the small button after this field, and you'll come into the 'code module' of the report. There you can delete everyting and...
  6. S

    Outlook And HTMLBody

    Thanks!!
  7. S

    Run a Sub in another Database

    Hello, Not tested, but I suppose it will work with: appAccess.YourModule.Update_DB_Information YourModule is the name of the module that contains the sub.
  8. S

    Conditions

    That's possible. Best for validating is using the BeforeUpdate-event. Then you say:if me.[Time in] > me.[Sample In] then MsgBox "No good" Cancel = True End If
  9. S

    Brain Gone Soft

    Hi Bobby, Welcome back in the real Access-world :D :D Indeed you can do this with a macro, with the action OpenReport. In the arguments you can give a WHERE-statement. There you say "ReportsIDField=Forms!YourForm!txtIDfield" (see Help for more about the syntax of the WHERE-statement)
  10. S

    Only print part of a report

    Hi, Macro's are well, but code is better. Why? In code you can integrate your own errorhandlers, and you're far more flexible. It's worth to study... The code you need can you exactly copy from my answer in this thread with the two code-samples. The first you've to put into the code-module of...
  11. S

    subform recordsource change

    Matts' suggestion is OK, but you can also refer to the parent of the subform where you run the code from (FRAME_1):Me.Parent!Frame_2.Form.Recordsource = strRecSource
  12. S

    pasting - Excel Code In Access

    You get this message because you're working with Late Binding and Access can not interpret the (numeric) value of xlValues and xlNone. There are two solutions: 1. The very best is using Early Binding, by setting a reference (Tools, References in the VB Editor) for the Excel Object Library. Then...
  13. S

    Only print part of a report

    Yes, that might be a problem, but in the Conditions before the TwoPagePreview-command, you can check the recordsource for the report with a DCount I'd think? When it's a table or query that might be no problem, only when you open the report somewhere with a Where-statement. I'd think this may be...
  14. S

    Only print part of a report

    It is possible, but I shouldn't do that. If you want it to do with macro's, you have to build an extra form, with two fields, where you can store the pagenumbers. (you can do that with a SetValue). With that, you've to look well at the conditions. Further, you must refer to the report with...
  15. S

    Accessing Access tables programmatically in Access 2000

    Maybe this? Private Sub lstFieldNames_AfterUpdate() Me.lstColumnNames.RowSource = "SELECT " & Me!lstFieldNames & " FROM MyTable" Me.lstColumnNames.Requery End SubWhere lstFieldNames is the first list
  16. S

    Only print part of a report

    OK, I tried and found: Put in the module of your report two Public variables for storing the page-numbers. You can set these with the event "Report_page", so if it's all in the module, copy this:Option Compare Database Option Explicit Public intFirstPage As Integer Public intLastPage As...
  17. S

    Only print part of a report

    You can (and I think you could in 97) specify the pages to print with the command PrintOut:DoCmd.OpenReport "MyReport", , acViewPreview DoCmd.PrintOut... DoCmd.Close acReport, "MyReport"But (for moose) the problem is how to determine which pages are currently on the screen in Preview-mode.
  18. S

    Print more than 1 copy

    Then I'm sorry. :confused: Maybe someone else?
  19. S

    Print more than 1 copy

    Hi, I should think it must be True instead of False? DoCmd.OpenReport "PlanningReport", acViewPreview DoCmd.PrintOut acPrintAll, , , , 2, True DoCmd.Close acReport, "PlanningReport", acSaveNo The last argument is the same as you use in the build-in print-dialogbox.
  20. S

    Me.TxtBox.DefaultValue

    Thank you Ian. However, jguscs was (as I think) referring to this topic: http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=53425 Greetz, Bert
Back
Top Bottom