That's the beauty of programming, so many ways to achievement.
Have a good day.
User Profile
Collapse
-
NeoPa
Here is an update as to how you and I have solved my problem. As stated above I wanted to place a textbox "CanBuild" next to the Group Header "Caliber" to show how many cartridges can be loaded, based on the totals of each component and selecting the lowest amount available.
What I did was create three textboxes in the Component Footer and naming them, txtTBrass, txtTPrimer, txtTProjectile....Leave a comment:
-
Hi NeoPa
You are right, I did lose sight of the component totals not being available as individual totals. I'll write some code to separate the component totals so a minimum total can be placed in textbox "CanBuild".
Thanks again and have a Happy Thanksgiving.Leave a comment:
-
Get The Minimum Value From A Textbox
I have a report where I am trying to get the minimum value from a calculated textbox named "TMetalic" which calculates the total of each component.
The main group named 'Caliber" shows different Calibers
The next group named "Component" lists three different components with detail items and quantities. In the Component Footer is where "TMetalic" sets, totaling the quantity of each component....Last edited by NeoPa; Nov 15 '22, 08:34 PM. -
I figured it out.
I changed the code a little to include these Dim's.
Then added a different way to get the file path to work.Code:Dim fileName As String, fldrPath As String, filePath As String
Then Case 3Code:fileName = Me.cboPrintReports.value fldrPath = "C:\Reports" filePath = fldrPath & "\" & fileName & ".pdf"
...Code:DoCmd.OutputTo
Leave a comment:
-
NeoPa
I did catch that part of the cmbPrintReports .
Well, removing that Dim statement did nothing for my problem. I have a Report where I put a command button on to save it as a pdf file and the file path is identical to the one I'm having an issue with. Running that code saves the report as a pdf an places it in the same folder and I can't figure out why. The only difference is the code behind the command button contains a...Leave a comment:
-
I found out what may the one problem.
The problem is a lazy rookie programmer (ME), I copied this code from a report I created a while back which I placed a Command Button on to convert to a PDF so I could eMail. Well being in a rush and not reviewing what I copied, I just found this Dim statement buried at the top.
Not supposed to be there....Code:Dim fileName As String, fldrPath As String, filePath As String
Leave a comment:
-
isladogs
That path doesn't work either, as my original path looks like this: "C:\Users\Admin istrator\Docume nts\Access Databases\Repor ts". That path is were my Access Database is and all the Access Security Trust Center Setting are pointed to this path along with it's Subfolders.
I even tried sending to D:\Reports with no luck.
Thanks for looking at it.Leave a comment:
-
Looked to see if the file path may be wrong but it is correct. I did try one thing I removed the file path completely all the way up to acFormatPDF even the comma and the code run through, the File Explorer popped up with the title "Output To" and the report name was what I selected.
I clicked OK and the report was saved as a PDF file and I opened it in Acrobat.
Why is the file path a problem and why is the extension...Leave a comment:
-
Hi NeoPa
Doing good I hope.
I had already tried that before I posted but my mistake was I was trying cboPrintReport. Column(1) and that obviously didn't work. I tried your suggestion with .Value and that was a error also. The error is a Run-time error '2501': The OutputTo action was created. When I click Debug it shows my line of code as follows.
...Code:DoCmd.OutputTo acOutputReport, "cboPrintReports.value",
Leave a comment:
-
ComboBox Selection to PDF
I am trying to save a report to a PDF file based on a Combobox selection of reports, but can't figure out
how to place a combobox selection into a docmd.output line of code?
Ex:
Replace "Summary" with a Combobox selection, this way I'm not hardcoding report names.
And can...Code:DoCmd.OutputTo acOutputReport, "Summary", acFormatPDF, "C:\Reports" & ".pdf"
-
Hi, how are you?
I was so close and yet so far way, all because of a zero.
Makes sense though, how can you plea for a zero if you don't ask for one.
Thanks again, my friend.Leave a comment:
-
ComboBox Columns & Blanks
A ComboBox with five columns, three of them are numeric in a Table. The ComboBox shows the Columns as numeric (1,200.00), but when the TextBox shows the value, it drops the coma (1200) and the decimal. Do care about the decimal because in the table the numbers are formatted as a numeric whole numbers.
The problem I'm having is trying to get the coma to appear when it should (1,200) it does appear in the column. I have tried to format... -
Thank you for looking at it.
This problem occurred one other time about a year ago, I did go through some notes but didn't find anything.
I'll go through all these DB's from that pass and research them, it's here somewhere and when I find the fix I'll share it with you.
Thanks again...Leave a comment:
-
I just put a TextBox "txtTItem" in the Report Footer to count the Detail Section "txtItems" and it returns the correct value "23".
Report View "23"
Print Preview "23"
Print "23" (Hard Copy)
This extra TextBox does not affect the Group total as expected.Leave a comment:
-
Thank you.
I use the detail section to show all the related items to each Mfg .Leave a comment:
-
Hi NeoPa
Report View shows "8" (Correct Answer)
Print Preview shows "1"
Print shows "1".Leave a comment:
-
Report Losing Group Count
I have a report that loses it's group count. In the Group Header there are two TextBoxes, "txtMfg" which is bound to and shows the names of manufactures in the table named "tMfg", the second TextBox named "txtMfgCoun t1" counts the number of times "txtMfg' changes in the (Mfg Group), and it's property settings are "=1" in it's Control Source and the Running Sum set to "Over All". I have also set... -
Hi NeoPa
I worked on this for hours, then after posting my question it did not appear and the next day it still wasn't there. I thought I may have exited without actually pressing the button, so I made another post and it to did not appear and I know I press the post button that time.
Any ways I did figure the out the problem which was a calculation error that I place in the Control Source for TextBox 3-5. Since this...Leave a comment:
-
Calculating ComboBox Columns
Getting the values from a ComboBox's columns works to fill in a TextBox but can't get the results from a calculation in another TextBox. I don't know why I get an #Error in TextBoxes 3-4 unless the value from a column is not a true numeric value but a string value and if so, how can it be converted to a numeric value for calculation?
Here is what I have.
TextBox1 - txtQty (Static quantity from ComboBox column-3)
TextBox2...
No activity results to display
Show More
Leave a comment: