-
WSFay Yocum
AskWoody LoungerI stepped through and it works that way. But, there is always one of those. Anyway. When I tab out of txtClassification the number doesn’t appear until after I tab through Learner ID(Employee #). Even though the After Update function is set to txtClassification. Thanks for the help. Do you think I should still send a stripped down version?
Fay
-
WSFay Yocum
AskWoody LoungerSorry just got out of teaching a class.
Sorry I was frustrated and didn’t post properly. When I tab out of txtClassification the LearnerID (Employee #) isn’t generated. No error messages I fixed the other issue. Thank you. Fay
-
WSFay Yocum
AskWoody LoungerOkay. Thanks. I had started to do the form/subform route. I will go back to it. Fay
-
WSFay Yocum
AskWoody LoungerThanks Hans.
-
WSFay Yocum
AskWoody LoungerYes in both cases.
-
WSFay Yocum
AskWoody LoungerThanks Hans that did what was needed for the first question. I will turn my attention to the second question. I appreciate your help. Fay
-
WSFay Yocum
AskWoody LoungerThanks Hans. I will review your answer on question two. I have attached a stripped down version of the material. The qryRequiredResults is the query that needs to show the class without a date.
-
WSFay Yocum
AskWoody LoungerYes, I actually looked at the properties dialog box instead of counting the pages. I just checked the buttons do show when I touch somewhere on the Attendance tab. But why do they show when I click on the tab itself for future? I think I am okay now. Just baffled with the future tab. Thanks Fay
-
WSFay Yocum
AskWoody LoungerThe field is called DateOfClassStart in the first second of code. It is officially called Date in the table that the second part of the code comes from. I put this in the second piece of code “tblCertificationDates.Date AS DateOfClassStart” seen in the previous message. It works when I run it as a query using the grid.
-
WSFay Yocum
AskWoody LoungerThanks Mark the first part of the code works correctly. I put Null in place of the “” in pot parts of the code. Now I am getting a 3067 error message “Query input must contain at least one table or query” with the second part of the the code. I have both a location, a table, and a from location in the code.
strSQL = “INSERT INTO tblACLSClassPrerequisites ( LearnerID, LastName, NickName, ClassName, DateOfClassStart, ACLS, CPR )” & _
“SELECT tblCertificationDates.LearnerID, tblLearners.LastName, tblLearners.NickName, tblCertificationDates.Type AS ClassName,” & _
“tblCertificationDates.Date AS DateOfClassStart, IIf(([ClassName] Like ‘ACLS*’),[Date],Null) AS ACLS, ” & _
“IIf(([ClassName] Like ‘BLS*’),[Date],Null) AS CPR” & _
“FROM tblCertificationDates INNER JOIN tblLearners ON tblCertificationDates.LearnerID = tblLearners.LearnerID” & _
“WHERE (((tblClasses.ClassName) Like ‘ACLS*’) AND (Not (tblSession.DateOfClassStart)>Now() And (tblSession.DateOfClassStart)>=DateAdd(‘yyyy’,-2,Date()))) ” & _
“OR (((tblClasses.ClassName) Like ‘BLS*’) AND (Not (tblSession.DateOfClassStart)>Now() And (tblSession.DateOfClassStart)>=DateAdd(‘yyyy’,-2,Date())))”Thanks for the help.Fay
-
WSFay Yocum
AskWoody LoungerI converted the query into SQL, but there is an error in the following code that I can’t find. When I run the code the first section creates the table, but…. It creates the CPR field but not the ACLS field. The ACLS correct date is shown in the CPR field. If there is no ACLS date the following shows up.
) AS ACLS, IIf(([ClassName] Like ‘BLS*’),[tblSession].[DateOfClassStart],
I then get an error message about not having equal fields at the designation when it gets to the second part of the code below. That is because there isn’t a ACLS filed created.
Thank you for your help. Fay
‘ SQL for make-table query
strSQL = ” SELECT tblLearners.LearnerID, tblLearners.LastName, tblLearners.NickName, tblClasses.ClassName, ” & _
“tblSession.DateOfClassStart, IIf(([ClassName] Like ‘ACLS*’),[tblSession].[DateOfClassStart],””) AS ACLS, ” & _
“IIf(([ClassName] Like ‘BLS*’),[tblSession].[DateOfClassStart],””) AS CPR INTO tblACLSClassPrerequisites ” & _
“FROM tblLearners INNER JOIN ((tblClasses INNER JOIN tblSession ON tblClasses.ClassID = tblSession.ClassID) ” & _
“INNER JOIN tblRegistrationLearner ON tblSession.ClassNumber = tblRegistrationLearner.ClassNumber) ” & _
“ON tblLearners.LearnerID = tblRegistrationLearner.LearnerID ” & _
“WHERE (((tblClasses.ClassName) Like ‘ACLS*’) AND ((tblSession.DateOfClassStart)>=DateAdd(‘yyyy’,-2,Date()))) OR (((tblClasses.ClassName) Like ‘BLS*’) ” & _
“AND ((tblSession.DateOfClassStart)>=DateAdd(‘yyyy’,-2,Date()))) ”‘ Execute it
DoCmd.RunSQL strSQL‘ SQL for append query
strSQL = “INSERT INTO tblACLSClassPrerequisites ( LearnerID, LastName, NickName, ClassName, DateOfClassStart, ACLS, CPR )” & _
“SELECT tblCertificationDates.LearnerID, tblLearners.LastName, tblLearners.NickName, tblCertificationDates.Type AS ClassName,” & _
“tblCertificationDates.Date AS DateOfClassStart, IIf(([ClassName] Like ‘ACLS*’),[Date],””) AS ACLS, ” & _
“IIf(([ClassName] Like ‘BLS*’),[Date],””) AS CPR” & _
“FROM tblCertificationDates INNER JOIN tblLearners ON tblCertificationDates.LearnerID = tblLearners.LearnerID” & _
“WHERE (((tblCertificationDates.Type) Like ‘ACLS*’) And ((tblCertificationDates.Date) >= DateAdd(‘yyyy’, -2, Date)))” & _
“or (((tblCertificationDates.Type) Like ‘BLS*’) And ((tblCertificationDates.Date) >= DateAdd(‘yyyy’, -2, Date)))”‘ Execute it
DoCmd.RunSQL strSQL -
WSFay Yocum
AskWoody LoungerThank you so much, it worked. I haven’t used that expression before. Fay
-
WSFay Yocum
AskWoody LoungerA women can hope. I was guessing that would be the answer. Thanks. Fay
-
WSFay Yocum
AskWoody LoungerThanks to both of you. I will take your recommendations and save my money. Fay
-
WSFay Yocum
AskWoody LoungerOne of the big reasons I was looking at it is that it is suppose to find the unused objects in the database. I think I have a bunch of currently unused queries. Is there a cheaper product for that task? Fay
![]() |
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
-
Seeing BSOD’s on 24H2?
by
Susan Bradley
1 hour, 40 minutes ago -
TUT For Private Llama LLM, Local Installation and Isolated from the Internet.
by
bbearren
5 hours, 7 minutes ago -
Upgrade from Windows 10 to 11
by
Holdsworth8
7 hours, 30 minutes ago -
Microsoft : AI-powered deception: Emerging fraud threats and countermeasures
by
Alex5723
10 hours, 20 minutes ago -
0patch
by
WSjcgc50
6 hours, 48 minutes ago -
Devices might encounter blue screen exception with the recent Windows updates
by
Susan Bradley
3 hours, 42 minutes ago -
Windows 11 Insider Preview Build 22631.5261 (23H2) released to Release Preview
by
joep517
13 hours, 20 minutes ago -
Problem opening image attachments
by
RobertG
14 hours, 54 minutes ago -
advice for setting up a new windows computer
by
routtco1001
1 day, 5 hours ago -
It’s Identity Theft Day!
by
Susan Bradley
9 hours, 56 minutes ago -
Android 15 require minimum 32GB of storage
by
Alex5723
1 day, 10 hours ago -
Mac Mini 2018, iPhone 6s 2015 Are Now Vintage
by
Alex5723
1 day, 10 hours ago -
Hertz says hackers stole customer credit card and driver’s license data
by
Alex5723
1 day, 11 hours ago -
Firefox became sluggish
by
Rick Corbett
1 day, 8 hours ago -
Windows 10 Build 19045.5794 (22H2) to Release Preview Channel
by
joep517
1 day, 15 hours ago -
Windows 11 Insider Preview Build 22635.5235 (23H2) released to BETA
by
joep517
1 day, 15 hours ago -
A Funny Thing Happened on the Way to the Forum
by
bbearren
12 hours, 47 minutes ago -
Download speeds only 0.3Mbps after 24H2 upgrade on WiFi and Ethernet
by
John
7 hours, 20 minutes ago -
T-Mobile 5G Wireless Internet
by
WSmmi16
13 hours, 27 minutes ago -
Clock missing above calendar in Windows 10
by
WSCape Sand
14 hours, 39 minutes ago -
Formula to Calculate Q1, Q2, Q3, or Q4 of the Year?
by
WSJon5
2 days, 6 hours ago -
The time has come for AI-generated art
by
Catherine Barrett
1 day, 10 hours ago -
Hackers are using two-factor authentication to infect you
by
B. Livingston
1 day, 20 hours ago -
23 and you
by
Max Stul Oppenheimer
2 days, 3 hours ago -
April’s deluge of patches
by
Susan Bradley
7 hours, 13 minutes ago -
Windows 11 Windows Updater question
by
Tex265
7 hours, 34 minutes ago -
Key, Key, my kingdom for a Key!
by
RetiredGeek
3 days, 12 hours ago -
Registry Patches for Windows 10
by
Drcard:))
3 days, 16 hours ago -
Cannot get line length to NOT wrap in Outlining in Word 365
by
CWBillow
2 days, 23 hours ago -
DDU (Display Driver Uninstaller) updates
by
Alex5723
2 days, 8 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.