-
WSThomasW
AskWoody LoungerCould your code test for YourRecordset.EOF? (the end of file marker)
-
WSThomasW
AskWoody LoungerI’m not sure about the code, but … Couldn’t you use a query, that sorts the table records the way you want to see them, as the source of the form or report?
-
WSThomasW
AskWoody LoungerIt seems as if you trying to do this in one query and that may be part of the problem. I believe you need two.
I think you can get the Open records more easily in one query by merely counting the number of records with an Is Null Close Date. Count these records by the key.
For the overdue records, you need a seperate query in which you should count the number of records by the key (even though the Due Date is required, don’t use count on it right now) and use the Where expression <= Date() in the criteria row for Due Date.
You should have two queries, each with two fields in the grid. Try it that way and see if it resolves the error. Then, if you need to do more, you can build from that.
-
WSThomasW
AskWoody LoungerIt is difficult for me to understand exactly what you have placed in the query grid.
On the Totals row, use Is Null in the criteria row for Close Date and set the Totals row to Where for that field. Use <=[Due Date] in a second criteria row for Close Date.You seem to be using AND instead of OR and a record cannot meet both criteria. Make sure you are counting on a field that is present in every record, like the key. Also, turn off the show box for the Close Date field.
If this doesn't help, please define what is in the grid more clearly and give us the error message.
-
WSThomasW
AskWoody LoungerIt’s not clear to me whether you want to see all the records or just the maximum date record. Nonetheless …
Instead of basing the form on the table, have you tried basing the form on a query for that table, sorted by date descending? This would show all the records in the order you want.
If you really wanted just the maximum date record, post back .
-
WSThomasW
AskWoody LoungerWhen you say the users are entering a new “line”, do you mean a new record? If so, and the Date Added field is Date/Time type, try using a Totals query, grouping on Product and using the Max function on Totals row for the Date Added field.
-
WSThomasW
AskWoody LoungerCharlotte: Thank you … your sample was exactly what I needed to satisfy a customer request to press Enter in a memo field (my memo field is named Notepad). I added the following code to the OnEnter event of the memo field so that a return/CurrentDate/:/space would be placed on a new line each time the user entered the field to add a subsequent note. The cursor then goes to the end of the current line, so the user can begin typing.
Private Sub Notepad_Enter()
Dim vDate As Date
Dim vColon As StringvDate = Format(Date, “Short Date”)
vColon = “: ”Me![Notepad] = Me![Notepad] & vbCrLf & vDate & vColon
Me![Notepad].SelStart = Len(Me![Notepad]) + 1End Sub
So far, so good. The problem is that placing the cursor at the end automatically scrolls the text box down, so that only the current date line is visible, even if there is plenty of space in the text box to see the entire contents of the memo field. The user has to scroll up to see prior notes. Is there a way to stop that from happening, that is; place the cursor at the current line without scrolling down unless it is necessary?
-
WSThomasW
AskWoody LoungerI can’t see your screen shot, but basically if the query is showing only the users who have a count >0, use this query (I’ll call it the Count query) in a new query. In that new query place the User table and link it to your Count query with an outer join, so that you see all User table records, regardless of their existence in the Count query. Place all the fields in the grid that you additionally need to see.
HTH
By the way, how can I see that screen shot? -
WSThomasW
AskWoody LoungerActually I just finished doing this. I do not know that this is the most elegant method, but it works. I use VB to Rename the report using the statement:
Name OldName as NewName
OldName is the (full path)name the report was given and NewName is a (full path)name that I build in VB, before this statement, which makes sense to the users.
This may be all you need, but if you would like me to post more complete code, let me know.
-
WSThomasW
AskWoody LoungerI believe you need to select 2 columns from your Location table in order to form the Union. Also, it is not clear to me why you Select Null. Nonetheless, here is the code I use for an All Regions choice in a combo box:
SELECT DISTINCTROW Region.[Region Code], Region.[Region Name] FROM Region UNION SELECT “*”, “All Regions” FROM Region;
HTH
-
WSThomasW
AskWoody LoungerI notice that the “A” and “c1″ in your code have no preceeding space, but the rest of the items do (as ” B”, ” c2″) Might that be the cause of your code only selecting the first value in each IN clause?
-
WSThomasW
AskWoody LoungerSorry, I misunderstood. I did a test with the code:
SELECT * FROM YourTable WHERE ((YourTable.[YourField]) In (“Monday”,”Tuesday”,”Friday”));
and it returned records with any of the three values.
Hope this is more helpful. -
WSThomasW
AskWoody LoungerIn the Query Design View, try using the OR operator. In the column for your fieldname type “Monday” Or “Tuesday” Or “Friday” in the criteria row.
-
WSThomasW
AskWoody LoungerI’m not certain of a way to do it on every form at once, but did you try typing the text as the Caption Property of the form? The form Caption specifies the text that appears in the title bar of the Form in the Form view.
Someone else may know a better way … -
WSThomasW
AskWoody LoungerUse DateDiff(“n”, Date1, Date2). The n will calculate the interval in minutes.
![]() |
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
-
Global data centers (AI) are driving a big increase in electricity demand
by
Kathy Stevens
6 hours, 22 minutes ago -
Office apps read-only for family members
by
b
8 hours, 58 minutes ago -
Defunct domain for Microsoft account
by
CWBillow
5 hours, 50 minutes ago -
24H2??
by
CWBillow
1 hour ago -
W11 23H2 April Updates threw ‘class not registered’
by
WindowsPersister
17 hours, 44 minutes ago -
Master patch listing for April 8th, 2025
by
Susan Bradley
10 hours, 57 minutes ago -
TotalAV safety warning popup
by
Theodore Nicholson
5 hours, 47 minutes ago -
two pages side by side land scape
by
marc
2 days, 6 hours ago -
Deleting obsolete OneNote notebooks
by
afillat
2 days, 8 hours ago -
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
1 day, 11 hours ago -
Security Essentials or Defender?
by
MalcolmP
1 day, 14 hours ago -
April 2025 updates out
by
Susan Bradley
9 hours, 28 minutes ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
1 day, 7 hours ago -
WARNING about Nvidia driver version 572.83 and 4000/5000 series cards
by
Bob99
21 hours, 56 minutes ago -
Creating an Index in Word 365
by
CWBillow
2 days ago -
Coming at Word 365 and Table of Contents
by
CWBillow
12 hours, 31 minutes ago -
Windows 11 Insider Preview Build 22635.5170 (23H2) released to BETA
by
joep517
3 days, 3 hours ago -
Has the Microsoft Account Sharing Problem Been Fixed?
by
jknauth
3 days, 7 hours ago -
W11 24H2 – Susan Bradley
by
G Pickerell
3 days, 9 hours ago -
7 tips to get the most out of Windows 11
by
Alex5723
3 days, 7 hours ago -
Using Office apps with non-Microsoft cloud services
by
Peter Deegan
3 days ago -
I installed Windows 11 24H2
by
Will Fastie
1 day, 6 hours ago -
NotifyIcons — Put that System tray to work!
by
Deanna McElveen
3 days, 12 hours ago -
Decisions to be made before moving to Windows 11
by
Susan Bradley
5 hours, 56 minutes ago -
Port of Seattle says ransomware breach impacts 90,000 people
by
Nibbled To Death By Ducks
3 days, 20 hours ago -
Looking for personal finance software with budgeting capabilities
by
cellsee6
3 days, 5 hours ago -
ATT/Yahoo Secure Mail Key
by
Lil88reb
3 days, 5 hours ago -
Devices with apps using sprotect.sys driver might stop responding
by
Alex5723
4 days, 13 hours ago -
Neowin – 20 times computers embarrassed themselves with public BSODs and goofups
by
EP
4 days, 22 hours ago -
Slow Down in Windows 10 performance after March 2025 updates ??
by
arbrich
21 hours, 56 minutes 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.