-
WSaltdotcom
AskWoody LoungerThanks. I figured out a way.
Clark -
WSaltdotcom
AskWoody LoungerThanks. I figured out a way.
Clark -
WSaltdotcom
AskWoody LoungerThanks!
-
WSaltdotcom
AskWoody LoungerYour suggestion to show hidden characters turned out to be very helpful. It proved that even something this chaotic has some order to it, in this case I was dealing mostly with multiples of five spaces and lots of tabs. A couple of find/replaces and I had the document all cleaned up. Thanks for your help.
Clark -
WSaltdotcom
AskWoody LoungerThanks. I tried this and it worked pretty well. It left some words run together and it left some larger than usual spaces between words. I’m not sure where that comes from. There will be a single space between two words, which looks like two or more spaces. If I delete it and hit the space bar, then a normal space is inserted.
Clark -
WSaltdotcom
AskWoody LoungerHa! It worked! Thanks very much HansV. It’s so nice to have a place where dummies like me can come and get help.
Clark -
WSaltdotcom
AskWoody LoungerThe table is named “In-Print Inventory2”. I was assuming that “tbl” had to be included in the SQL. Leaving it out brings a third error. So here’s the code:
Private Sub Publisher_NotInList(NewData As String, Response As Integer)
If MsgBox(“The type ” & NewData & ” does not occur not in the list.” & vbCrLf & _
“Do you want to add it?”, vbYesNo + vbQuestion) = vbYes Then
Dim strSQL As String
strSQL = “INSERT INTO [In-Print Inventory2] (Publisher) VALUES (” & _
Chr$(34) & NewData & Chr$(34) & “)”
CurrentDb.Execute strSQL, dbFailOnError
Response = acDataErrAdded
Else
Publisher.Undo
Response = acDataErrContinue
End If
End SubHere’s the new error message:”Run-time error ‘3464’: Data type mismatch in criteria expression.” And the de###### references the same line of code (CurrentDb.Execute strSQL, dbFailOnError)
-
WSaltdotcom
AskWoody LoungerAdding brackets (like [tblIn-Print Inventory2]) just brings up another error: “runtime error ‘3192’ could not find output table ‘tblIn-Print Inventory2’.”
-
WSaltdotcom
AskWoody LoungerModifying some of the code examples I was referred to I have come up with the following:
Private Sub Publisher_NotInList(NewData As String, Response As Integer)
If MsgBox(“The type ” & NewData & ” does not occur not in the list.” & vbCrLf & _
“Do you want to add it?”, vbYesNo + vbQuestion) = vbYes Then
Dim strSQL As String
strSQL = “INSERT INTO tblIn-Print Inventory2 (Publisher) VALUES (” & _
Chr$(34) & NewData & Chr$(34) & “)”
CurrentDb.Execute strSQL, dbFailOnError
Response = acDataErrAdded
Else
Publisher.Undo
Response = acDataErrContinue
End If
End SubWhat I am trying to do is this: in the form “In-Print Inventory2”, based on the the table “In-Print Inventory2”, there is a field called “Publisher” which is a combo box based on the field “Short Name” in the table “Publishers”. I want to be able to add a new publisher to the combo box on the fly. I’ve placed the code above as an event procedure in the Not In List event property of the field “Publisher” of the form “In-Print Inventory2”. When I add a new publisher in the form I’m told the name is not on the list, would I like to add it. When I click yes I get “runtime error ‘3134’ syntax error in INSERT INTO statement” and I’m referred to this line in the code:
CurrentDb.Execute strSQL, dbFailOnErrorClark
-
WSaltdotcom
AskWoody LoungerWould it possible for you to describe this procedure for me?
Clark -
WSaltdotcom
AskWoody LoungerThanks again!
-
WSaltdotcom
AskWoody LoungerThis macro works very well for me. However, sometimes I would like to delete an entire row because it’s a duplicate entry or for some other reason. This messes up the balance in every subsequent row. My only recourse is to leave the incorrect entry and change its value to 0. Do I need a “delete row” macro now?
Clark -
WSaltdotcom
AskWoody LoungerFixed it. Thanks.
Clark -
WSaltdotcom
AskWoody LoungerThanks, that worked nicely. Actually this is the first time since beginning to use Access 4 years ago that I have found it necessary to know which of my publications my customers had purchased. Until now it only mattered if they had bought anything.
Clark -
WSaltdotcom
AskWoody LoungerWorks great! Thanks!
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
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
-
How to get into a manual setup screen in 2024 Outlook classic?
by
Tex265
16 minutes ago -
Linux : ARMO rootkit “Curing”
by
Alex5723
1 hour, 14 minutes ago -
Employee monitoring app leaks 21 million screenshots in real time
by
Alex5723
1 hour, 20 minutes ago -
Google AI is now hallucinating idioms
by
Alex5723
1 hour, 51 minutes ago -
april update
by
69800
2 hours, 23 minutes ago -
Windows 11 Insider Preview build 27842 released to Canary
by
joep517
2 hours, 46 minutes ago -
Quick Fix for Slowing File Explorer
by
Drcard:))
2 hours, 58 minutes ago -
WuMgr not loading?
by
LHiggins
3 hours, 34 minutes ago -
Word crashes when accessing Help
by
CWBillow
6 hours, 39 minutes ago -
New Microsoft Nag — Danger! Danger! sign-in to your Microsoft Account
by
EricB
2 hours, 37 minutes ago -
Blank Inetpub folder
by
Susan Bradley
1 minute ago -
Google : Extended Repair Program for Pixel 7a
by
Alex5723
13 hours, 9 minutes ago -
Updates seem to have broken Microsoft Edge
by
rebop2020
10 minutes ago -
Wait command?
by
CWBillow
6 hours, 25 minutes ago -
Malwarebytes 5 Free version manual platform updates
by
Bob99
19 hours, 47 minutes ago -
inetpub : Microsoft’s patch for CVE-2025–21204 introduces vulnerability
by
Alex5723
1 day, 2 hours ago -
Windows 10 finally gets fix
by
Susan Bradley
1 day, 11 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.04.09.545
by
Alex5723
1 day, 12 hours ago -
Win 7 MS Essentials suddenly not showing number of items scanned.
by
Oldtimer
1 day, 7 hours ago -
France : A law requiring messaging apps to implement a backdoor ..
by
Alex5723
2 days, 1 hour ago -
Dev runs Windows 11 ARM on an iPad Air M2
by
Alex5723
2 days, 2 hours ago -
MS-DEFCON 3: Cleanup time
by
Susan Bradley
1 hour, 35 minutes ago -
KB5056686 (.NET v8.0.15) Delivered Twice in April 2025
by
lmacri
7 hours, 47 minutes ago -
How to enable Extended Security Maintenance on Ubuntu 20.04 LTS before it dies
by
Alex5723
2 days, 13 hours ago -
Windows 11 Insider Preview build 26200.5562 released to DEV
by
joep517
2 days, 17 hours ago -
Windows 11 Insider Preview build 26120.3872 (24H2) released to BETA
by
joep517
2 days, 17 hours ago -
Unable to eject external hard drives
by
Robertos42
1 day, 4 hours ago -
Saying goodbye to not-so-great technology
by
Susan Bradley
15 hours, 55 minutes ago -
Tech I don’t miss, and some I do
by
Will Fastie
13 hours, 49 minutes ago -
Synology limits hard drives
by
Susan Bradley
3 days, 21 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.