-
WSlinux_man
AskWoody LoungerAugust 6, 2004 at 6:52 pm in reply to: Shapes.AddShape(msoShapeRectangle) Properties (2000 / SR1) #861180Thank you Hans and Steve for your assistance. Turns out, I apparently solved the ‘riddle’ before I got your answers. First time that’s ever happened. Here is what I came up with on my own before I read your posts:
With Sheets("Rate Chart").Shapes.AddShape(msoShapeRectangle, 460, 270, 175, 30) .Name = "RateBox" With .TextFrame.Characters .Text = "Rate = " & Range("Spring_Rate_Result").Text & " lbs/in" .Font.Bold = True .Font.Name = "Verdana" .Font.Size = 14 End With .TextFrame.HorizontalAlignment = xlHAlignCenter .TextFrame.VerticalAlignment = xlVAlignCenter .Line.Visible = 0 .Fill.ForeColor.RGB = RGB(255, 255, 215) End With
Basically the same result. Thank you for your help just the same. This Lounge has been a GREAT tool for me!!
Drew
-
WSlinux_man
AskWoody LoungerAugust 6, 2004 at 6:52 pm in reply to: Shapes.AddShape(msoShapeRectangle) Properties (2000 / SR1) #861181Thank you Hans and Steve for your assistance. Turns out, I apparently solved the ‘riddle’ before I got your answers. First time that’s ever happened. Here is what I came up with on my own before I read your posts:
With Sheets("Rate Chart").Shapes.AddShape(msoShapeRectangle, 460, 270, 175, 30) .Name = "RateBox" With .TextFrame.Characters .Text = "Rate = " & Range("Spring_Rate_Result").Text & " lbs/in" .Font.Bold = True .Font.Name = "Verdana" .Font.Size = 14 End With .TextFrame.HorizontalAlignment = xlHAlignCenter .TextFrame.VerticalAlignment = xlVAlignCenter .Line.Visible = 0 .Fill.ForeColor.RGB = RGB(255, 255, 215) End With
Basically the same result. Thank you for your help just the same. This Lounge has been a GREAT tool for me!!
Drew
-
WSlinux_man
AskWoody LoungerMay 19, 2004 at 6:19 pm in reply to: Automating Report to Snapshot for >400 records (2000 SR-1) #829570Thanks for your assistance Hans. I did finally get the task accomplished. The problems occured where the reports that were being opened had associated events tied to them “On Open”. I had to replicate those reports and forms and remove the events connected with them. It now works perfectly.
Drew
-
WSlinux_man
AskWoody LoungerMay 19, 2004 at 6:19 pm in reply to: Automating Report to Snapshot for >400 records (2000 SR-1) #829571Thanks for your assistance Hans. I did finally get the task accomplished. The problems occured where the reports that were being opened had associated events tied to them “On Open”. I had to replicate those reports and forms and remove the events connected with them. It now works perfectly.
Drew
-
WSlinux_man
AskWoody LoungerMay 18, 2004 at 2:46 pm in reply to: Automating Report to Snapshot for >400 records (2000 SR-1) #828899Edited by HansV to break very long lines that caused horizontal scrolling
Hans,
Thanks for taking a look at my problem. I had, by the way, already read through the other posting by CaptainKen to try and learn something from that dialog. However, I am still stuck. I am about to try something similar to his approach, but I think I need to create copies of the original forms and reports, etc. as there are events associated with them opening. I was able to get it to load each report in turn, but it’s prompting for the part number two more times for each record (this is related to the issue I mentioned in my previous sentence). The copies will then need to be edited in order to remove the associated events which are causing the part numbers to be requested again. At least that’s my guess. I figured it should be a simple loop such as the following (this is straight from the existing module):
Do Until .EOF 'sets through recordset, creating setup sheet for each record If Dir("C:My Documents", vbDirectory) = "My Documents" Then If Dir("C:My DocumentsPackagingSpecs", vbDirectory) = "PackagingSpecs" Then strPartNumber = rstPackagingSpec!CompanyNo 'assign current PartNumber to variable strFileName = "C:My DocumentsPackagingSpecs" & strPartNumber & ".snp" 'create file name DoCmd.OpenReport "rpt,PackagingSpecForSnapshotOutput", acViewPreview, , _ "qry,PackagingSpecs" 'open report for current record DoCmd.SelectObject acReport, "rpt,PackagingSpecForSnapshotOutput" 'select report DoCmd.OutputTo acOutputReport, , strOutputFormat, strFileName, False 'create .snp file of report DoCmd.close acReport, "rpt,PackagingSpecForSnapshotOutput", acSaveNo 'close report .MoveNext 'move to next record Else MkDir ("C:My DocumentsPackagingSpecs") End If Else MkDir ("C:My DocumentsPackagingSpecs") End If Loop
The code above is a slightly modified version of some code that works in a similar situation in another database. I can’t see why it won’t work in this one.
Drew
-
WSlinux_man
AskWoody LoungerMay 18, 2004 at 2:46 pm in reply to: Automating Report to Snapshot for >400 records (2000 SR-1) #828900Edited by HansV to break very long lines that caused horizontal scrolling
Hans,
Thanks for taking a look at my problem. I had, by the way, already read through the other posting by CaptainKen to try and learn something from that dialog. However, I am still stuck. I am about to try something similar to his approach, but I think I need to create copies of the original forms and reports, etc. as there are events associated with them opening. I was able to get it to load each report in turn, but it’s prompting for the part number two more times for each record (this is related to the issue I mentioned in my previous sentence). The copies will then need to be edited in order to remove the associated events which are causing the part numbers to be requested again. At least that’s my guess. I figured it should be a simple loop such as the following (this is straight from the existing module):
Do Until .EOF 'sets through recordset, creating setup sheet for each record If Dir("C:My Documents", vbDirectory) = "My Documents" Then If Dir("C:My DocumentsPackagingSpecs", vbDirectory) = "PackagingSpecs" Then strPartNumber = rstPackagingSpec!CompanyNo 'assign current PartNumber to variable strFileName = "C:My DocumentsPackagingSpecs" & strPartNumber & ".snp" 'create file name DoCmd.OpenReport "rpt,PackagingSpecForSnapshotOutput", acViewPreview, , _ "qry,PackagingSpecs" 'open report for current record DoCmd.SelectObject acReport, "rpt,PackagingSpecForSnapshotOutput" 'select report DoCmd.OutputTo acOutputReport, , strOutputFormat, strFileName, False 'create .snp file of report DoCmd.close acReport, "rpt,PackagingSpecForSnapshotOutput", acSaveNo 'close report .MoveNext 'move to next record Else MkDir ("C:My DocumentsPackagingSpecs") End If Else MkDir ("C:My DocumentsPackagingSpecs") End If Loop
The code above is a slightly modified version of some code that works in a similar situation in another database. I can’t see why it won’t work in this one.
Drew
-
WSlinux_man
AskWoody LoungerMay 18, 2004 at 2:18 pm in reply to: Query records that fall within a date range (2000 SR-1) #828880Thanks for all your help. I did actually look at the reply above and fit it into our database and it worked great!! Sorry for not thanking you earlier, I just got swamped and neglected to go back to offer my thanks.
Drew
-
WSlinux_man
AskWoody LoungerMay 18, 2004 at 2:18 pm in reply to: Query records that fall within a date range (2000 SR-1) #828881Thanks for all your help. I did actually look at the reply above and fit it into our database and it worked great!! Sorry for not thanking you earlier, I just got swamped and neglected to go back to offer my thanks.
Drew
-
WSlinux_man
AskWoody LoungerApril 12, 2004 at 2:11 pm in reply to: Problem with Personal.xls macro worksheet (2000 SR-1) #813500DOH!!!!!! (as I smack my forehead)
You are brilliant!! Thanks!! That was the issue. I checked the macro that was assigned to one menu item and it refered to a my PERSONAL.XLS file macro when it was stored on another partition. I did as you suggested and all of them work again.
THANKS AGAIN for your help!!
Drew
-
WSlinux_man
AskWoody LoungerApril 12, 2004 at 2:11 pm in reply to: Problem with Personal.xls macro worksheet (2000 SR-1) #813501DOH!!!!!! (as I smack my forehead)
You are brilliant!! Thanks!! That was the issue. I checked the macro that was assigned to one menu item and it refered to a my PERSONAL.XLS file macro when it was stored on another partition. I did as you suggested and all of them work again.
THANKS AGAIN for your help!!
Drew
-
WSlinux_man
AskWoody LoungerMarch 12, 2004 at 2:47 pm in reply to: Query records that fall within a date range (2000 SR-1) #798139(Edited by HansV to prevent horizontal scrolling.)
OK. I am going crazy. I have a query that returns the appropriate records from a table based on some mathematical criteria (i.e. the dates that I’ve already mentioned). I still can’t get the report formatted to do what I want. I’ve tried many different ideas and I either get errors or it just doesn’t return any data. Basically, I don’t know how I should be even approaching this task. Should I build a module, a function, an event procedure that runs when the report is loaded? I have no idea.
Here’s what I got and I know it isn’t right, but perhaps you can see what incorrect assumptions I am making: (BTW, I have only tried to accomplish the first
step of assigning the “SAMPLE” keyword under the appropriate time period column. I will also need the LAUNCH keyword under the appropriate column once I get this part figured out.)Option Compare Database Public Sub DeliveryForecastReport() Dim db1 As Database Dim rs1 As Recordset Dim iSampleDueDiff As Long Dim rd1 As Recordset Set db1 = CurrentDb 'I know the statement below is wrong, but I don't know 'how to work with the results of the query 'The field name SampleDueDue is actually correct. The original developer used it Set rd1 = db1.OpenRecordset("Select SampleDueDue From [qry,DeliveryForecast]") With rd1 Do Until .EOF iSampleDueDiff = DateDiff("d", Nz(SampleDueDue, #1/1/100#), Date) Select Case iSampleDueDiff Case -60 To -30 lblDaysAgo60.Caption = "SAMPLE" Case -30 To 0 lblDaysAgo30.Caption = "SAMPLE" Case 0 To 30 lblDaysAgoCurrent.Caption = "SAMPLE" Case 30 To 60 lblDaysFuture30.Caption = "SAMPLE" Case 60 To 90 lblDaysFuture60.Caption = "SAMPLE" Case 90 To 120 lblDaysFuture90.Caption = "SAMPLE" Case 120 To 150 lblDaysFuture120.Caption = "SAMPLE" Case 150 To 180 lblDaysFuture150.Caption = "SAMPLE" Case 180 To 210 lblDaysFuture180.Caption = "SAMPLE" Case 210 To 240 lblDaysFuture210.Caption = "SAMPLE" Case 240 To 270 lblDaysFuture240.Caption = "SAMPLE" Case 270 To 300 lblDaysFuture270.Caption = "SAMPLE" Case 300 To 330 lblDaysFuture300.Caption = "SAMPLE" Case 330 To 360 lblDaysFuture330.Caption = "SAMPLE" Case 360 To 390 lblDaysFuture360.Caption = "SAMPLE" End Select Loop End With End Sub
-
WSlinux_man
AskWoody LoungerMarch 12, 2004 at 2:47 pm in reply to: Query records that fall within a date range (2000 SR-1) #798140(Edited by HansV to prevent horizontal scrolling.)
OK. I am going crazy. I have a query that returns the appropriate records from a table based on some mathematical criteria (i.e. the dates that I’ve already mentioned). I still can’t get the report formatted to do what I want. I’ve tried many different ideas and I either get errors or it just doesn’t return any data. Basically, I don’t know how I should be even approaching this task. Should I build a module, a function, an event procedure that runs when the report is loaded? I have no idea.
Here’s what I got and I know it isn’t right, but perhaps you can see what incorrect assumptions I am making: (BTW, I have only tried to accomplish the first
step of assigning the “SAMPLE” keyword under the appropriate time period column. I will also need the LAUNCH keyword under the appropriate column once I get this part figured out.)Option Compare Database Public Sub DeliveryForecastReport() Dim db1 As Database Dim rs1 As Recordset Dim iSampleDueDiff As Long Dim rd1 As Recordset Set db1 = CurrentDb 'I know the statement below is wrong, but I don't know 'how to work with the results of the query 'The field name SampleDueDue is actually correct. The original developer used it Set rd1 = db1.OpenRecordset("Select SampleDueDue From [qry,DeliveryForecast]") With rd1 Do Until .EOF iSampleDueDiff = DateDiff("d", Nz(SampleDueDue, #1/1/100#), Date) Select Case iSampleDueDiff Case -60 To -30 lblDaysAgo60.Caption = "SAMPLE" Case -30 To 0 lblDaysAgo30.Caption = "SAMPLE" Case 0 To 30 lblDaysAgoCurrent.Caption = "SAMPLE" Case 30 To 60 lblDaysFuture30.Caption = "SAMPLE" Case 60 To 90 lblDaysFuture60.Caption = "SAMPLE" Case 90 To 120 lblDaysFuture90.Caption = "SAMPLE" Case 120 To 150 lblDaysFuture120.Caption = "SAMPLE" Case 150 To 180 lblDaysFuture150.Caption = "SAMPLE" Case 180 To 210 lblDaysFuture180.Caption = "SAMPLE" Case 210 To 240 lblDaysFuture210.Caption = "SAMPLE" Case 240 To 270 lblDaysFuture240.Caption = "SAMPLE" Case 270 To 300 lblDaysFuture270.Caption = "SAMPLE" Case 300 To 330 lblDaysFuture300.Caption = "SAMPLE" Case 330 To 360 lblDaysFuture330.Caption = "SAMPLE" Case 360 To 390 lblDaysFuture360.Caption = "SAMPLE" End Select Loop End With End Sub
-
WSlinux_man
AskWoody LoungerMarch 12, 2004 at 12:24 pm in reply to: Query records that fall within a date range (2000 SR-1) #798025It’s unlikely at best that the Sample date and the Launch date would ever fall in teh same month as the time period between these two developments would be at least 2 -6 months. However, that is a good point. Perhaps I’ll just refer to days instead of months. So, using that as an example, I would likely use:
DateDiff("d", SampleDate, Date())
However, I have tried to use this type of statement and I keep getting an error about attempting to assign a value of “Null” to a variable. I find the help included in Access to be limited at best. There is usually only one example for each command and that example only shows the few lines of code without showing how the variables are declared, etc. etc. This is where I need the help. I am not sure how to reference the textboxes on the form. I thought I would use something like the following:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Dim iSampleDueDiff As Integer Dim iSampleDueDate As Date Dim iLaunchDate As Date iSampleDueDiff = DateDiff("d", Date, SampleDate)
where the variable SampleDate is one of the fields in the Access database which contains the date. That’s where the code fails. How do I correctly refer to the SampleDate field in each record? What happens if there is no date in that field? How do I trap/skip over that error should this formula encounter an empty cell?
Drew (confused!)
-
WSlinux_man
AskWoody LoungerMarch 12, 2004 at 12:24 pm in reply to: Query records that fall within a date range (2000 SR-1) #798026It’s unlikely at best that the Sample date and the Launch date would ever fall in teh same month as the time period between these two developments would be at least 2 -6 months. However, that is a good point. Perhaps I’ll just refer to days instead of months. So, using that as an example, I would likely use:
DateDiff("d", SampleDate, Date())
However, I have tried to use this type of statement and I keep getting an error about attempting to assign a value of “Null” to a variable. I find the help included in Access to be limited at best. There is usually only one example for each command and that example only shows the few lines of code without showing how the variables are declared, etc. etc. This is where I need the help. I am not sure how to reference the textboxes on the form. I thought I would use something like the following:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Dim iSampleDueDiff As Integer Dim iSampleDueDate As Date Dim iLaunchDate As Date iSampleDueDiff = DateDiff("d", Date, SampleDate)
where the variable SampleDate is one of the fields in the Access database which contains the date. That’s where the code fails. How do I correctly refer to the SampleDate field in each record? What happens if there is no date in that field? How do I trap/skip over that error should this formula encounter an empty cell?
Drew (confused!)
-
WSlinux_man
AskWoody LoungerMarch 11, 2004 at 7:38 pm in reply to: Query records that fall within a date range (2000 SR-1) #797748Thanks for the help so far.
Can anyone advise me on the next stage of this little report. I have been asked to create a report that formats
the results of the former query into a table structure such as that shown below:Part Number 2MonthsAgo 1MonthsAgo ThisMonth 1MonthsAway 2MonthsAway 828222 Sample Launch 548771 Sample Launch Basically, for each record returned in the query, tabulate it such that the SampleDate interval is shown as a word “SAMPLE”
under the appropriate column and the LaunchDate interval is shown as a word “LAUNCH” under the appropriate column. I
hope that is clear. Essentially it might be compared loosely to a Gantt Chart.I was imagining a case statement for each record returned in which the appropriate textbox, in the report detail would contain
the associated keyword under the appropriate date column. So far I’ve constructed a report that has a row of unbound
textboxes for the records and the header that are associated with the appropriate interval from DATE(). That being, 2 months
ago, 1 month ago, now, 1 month away, etc.Any advise you can provide would be most helpful!!
Drew
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Sometimes I wonder about these bots
by
Susan Bradley
5 hours, 34 minutes ago -
Does windows update component store “self heal”?
by
Mike Cross
11 hours, 39 minutes ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
12 hours, 39 minutes ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
12 hours, 4 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
8 hours, 34 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
15 hours, 21 minutes ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
15 hours, 22 minutes ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
3 hours, 56 minutes ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
23 hours, 30 minutes ago -
0Patch, where to begin
by
cassel23
17 hours, 32 minutes ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
1 day, 13 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
1 day ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
1 day, 21 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
1 day, 12 hours ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
23 hours, 47 minutes ago -
Installer program can’t read my registry
by
Peobody
6 hours, 27 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
1 day, 10 hours ago -
Intel : CVE-2024-45332, CVE-2024-43420, CVE-2025-20623
by
Alex5723
1 day, 17 hours ago -
False error message from eMClient
by
WSSebastian42
2 days, 8 hours ago -
Awoke to a rebooted Mac (crashed?)
by
rebop2020
2 days, 17 hours ago -
Office 2021 Perpetual for Mac
by
rebop2020
2 days, 19 hours ago -
AutoSave is for Microsoft, not for you
by
Will Fastie
5 hours, 43 minutes ago -
Difface : Reconstruction of 3D Human Facial Images from DNA Sequence
by
Alex5723
2 days, 22 hours ago -
Seven things we learned from WhatsApp vs. NSO Group spyware lawsuit
by
Alex5723
6 hours, 2 minutes ago -
Outdated Laptop
by
jdamkeene
3 days, 4 hours ago -
Updating Keepass2Android
by
CBFPD-Chief115
3 days, 9 hours ago -
Another big Microsoft layoff
by
Charlie
3 days, 9 hours ago -
PowerShell to detect NPU – Testers Needed
by
RetiredGeek
11 hours, 16 minutes ago -
May 2025 updates are out
by
Susan Bradley
12 hours, 58 minutes ago -
Windows 11 Insider Preview build 26200.5600 released to DEV
by
joep517
3 days, 15 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.