Recent content by anymuon

  1. A

    Report not hidden when using acHidden with Docmd.OpenReport

    Quite a nice piece of work. I'll keep this in my code library. Had quite a few ideas in it. Nice to have a database that is a little more rigorously built. I had a feeling there was maybe a timing issue - why I included rough execution time. I do have a couple of areas I can optimize some code...
  2. A

    Report not hidden when using acHidden with Docmd.OpenReport

    Pat: This database goes back to 1997 and uses mostly macros with limited vba coding. Coding has been patched but not really updated. They have over a couple of hundred reports plus that many queries. Field staff prints out 5-30 reports, depending on site and staff, and has to supply the...
  3. A

    Report not hidden when using acHidden with Docmd.OpenReport

    Riiiggghhhht! EXACTLY. I wonder why this is a thing, a PITA thing. Can't use acViewReport or acViewNormal with DoCmd.SetParameter. The SetParameter string is in the report source query. There are a couple of hundred reports using this format. I have just tried that combination and it is...
  4. A

    Report not hidden when using acHidden with Docmd.OpenReport

    Running Office 365 enterprise I have a form that narrows down the reports for field staff. It allows them to set the report query filter, which is a parameter query (2nd line in code below). I can't change the use of SetParameter or I would just change the report source and change it back. It...
  5. A

    Use VBA to change Report parameter. DoCmd.SetParameter

    Could, for the number out of the textbox. For this, it is about 6, 1/2 dozen or the other. There is just no real gain in execution or code management. I used to smack most everything in subs, functions and variables. I still do, but sometimes it makes more sense just write out the few lines of...
  6. A

    Use VBA to change Report parameter. DoCmd.SetParameter

    Removed an unnecessary loop. This is something like I normally do. Without the parameter query. I have not tested this. It is in the beginning stages. I would just have to reset the report name, some pseudo code: 'untested code for discussion only With ctlrptselected 'loop through all...
  7. A

    Use VBA to change Report parameter. DoCmd.SetParameter

    Thanks for the response. Not yet, I'm just at the code outline stage. Once I get the framework working together, I will clean up the code and add error checking. Correct. I will just loop the ID (PWSID or Number0) through the Listbox.Selected after pressing the print button and call each...
  8. A

    Use VBA to change Report parameter. DoCmd.SetParameter

    Can't make that change to the base report. Not my system nor have I ever used a parameter query in the base report. Using this report parameter query format is the same for over a hundred reports. I would normally just set the report filter in VBA. This way I could filter OnOpen to whatever the...
  9. A

    Use VBA to change Report parameter. DoCmd.SetParameter

    Let's try this again. Forum wouldn't let me Post my initial reply to my post. Perhaps I can't post a link. But some housecleaning. MajP quite correct. I had implemented same format found here in post 1713588, which is the same as MajP's post. This code won't work, even though Me.Text42.Value...
  10. A

    Use VBA to change Report parameter. DoCmd.SetParameter

    Misunderstood what object SetParameter was pointing to or how to point to the underlying parameter in the query. Revised Code: Private Sub Print_Click() Dim strPWSID strPWSID = Me.Text42.Value DoCmd.SetParameter "Enter PWSID (Use IN + PWSID)", Chr(34) & strPWSID & Chr(34)...
  11. A

    Use VBA to change Report parameter. DoCmd.SetParameter

    I have been trying to bypass the parameter query used in a Report Record Source using DoCmd.SetParameter in VBA. I've not used this format and I can't change the base Report Record Source and remove the parameter. Iseem to be a little thick in the head on the use of DoCmd.SetParameter. I get...
Top Bottom