-
WSLarryEngles
AskWoody LoungerYou really need a table that relates the Florist with the zip codes. That would replace the memo field currently trying to be used.
For example: you could add table ZipsForFlorist with fields ZIPCode and MBR. Then you would replace your subform frmZip_info with a form, not a datasheet. On that subform, add a button (you realize this is only one way to approach the problem) that adds that zip for that florist to table ZipsForFlorist (after first checking that that zip is not already there for the florist). Actually, you should add an index to ZipsForFlorist that has fields ZIPCode and MBR and the index is declared unique. After adding the entry to ZipsForFlorist, you will probably have to requery the subform (a new subform) showing the entries in ZipsForFlorist for this florist.
I hope this is not all beyond you.
After I posted the above, I realized that once you have the table ZipsForFlorists, you can build a subform showing it. And you can make the zip a combo box. That combo box can use the same row source as is currently used in the subform frmZip_Info (that is, the zips for a city). The user can then add easily via the combo box new zips. This approach requires less code.
-
WSLarryEngles
AskWoody LoungerBy the way, it would be nice if you updated your profile to show where you are from. I like seeing where posters are located and I suspect others do too.
In looking further, a couple questions you should ask yourself:
1) Why are the zip codes being put in the memo field? Are they not already in the tblActiveFloristZipCode table? If so, why not simply display them as you currently do and forget the memo field?
2) Why is table tblActiveFloristZipCode linked to OwnerID and not MBR? If it should be OwnerID, then why is the user entering MBR? One or the other seems wrong. I’d hazard a guess that a single owner must own more than one florist. This should really be cleaned up.
3) Why do you switch to new entry every time? Why not have a form that positions to the MBR and shows the entries?
-
WSLarryEngles
AskWoody LoungerWendellB has it right. There are serious design issues. In addition to the things he mentioned, I notice the field MBR is 50 characters in one table and 255 in another. Not good. On the main form, the MBR control accepts the enter key as entry in the field. I suspect that there never is a carriage return in the MBR.
I would suggest you find a colleague to help with the underlying design.
-
WSLarryEngles
AskWoody LoungerJohn – thanks for the reference to StrConv. I can’t tell you how many times (more than once for sure) I’ve written code to parse strings, then capitalize the first letter of each word. Nice find!
-
WSLarryEngles
AskWoody LoungerReaching back into my memory banks (a risky proposition at best), I seem to remember that you need pass-through queries to run stored procedures. It’s an option when you build a query.
-
WSLarryEngles
AskWoody LoungerHere is a custom function that gets the max date from a list of any length. Just keep adding arguments. It handles nulls and invalid dates as well.
Code:Public Function MaxOfDate(ParamArray dates() As Variant) As Date Dim MaxDate As Date, i As Integer MaxDate = 0 For i = 0 To UBound(dates) If (IsDate(dates(i))) Then If (Nz(dates(i), 0) > MaxDate) Then MaxDate = dates(i) End If Next i MaxOfDate = MaxDate Exit Function End Function
An example call would be: MaxDate = MaxOfDates (DateField1, DateField 2, DateField3, DateField4, … )
This works best in a form where you have only one record that is being evaluated, but it can work in a query as well, but, as AKW mentioned, it will be slower. In a query, I’d use nested iif statements if this became too slow.
-
WSLarryEngles
AskWoody LoungerOne possibility is to join the “look-up” table and use the linked value to paste instead of the index of the linked value. In that way, you’ll have the displayed value and not have to link to a sharepoint table.
-
WSLarryEngles
AskWoody LoungerI’m trying to figure out the situation in which this could be a choice. I suppose the 2 million record table is normalized and contains multiple records for each something (person, thing, or whatever), and the 36,000 record table would have only 1 record for each something. Unless you can prove some overwhelming reason to decide otherwise, I’m going to select the normalized version every time.
I would echo Mark’s statement. Always go with normalized and deviate only when forced to do so. You’ll have fewer headaches and more flexibility with that approach.
-
WSLarryEngles
AskWoody LoungerChristopher: I don’t really have a clue here, but try this. I’ve usually steered away from nulls when working with strings (because I usually want a blank to be treated the same as a null). Since you are working with strings, convert the null to a zero-length string (nz function) and then use the trim function to test the result for zero length. This treats blanks and nulls the same. You can do all this in a single SQL statement. It should not make any difference, but since we’re grasping at straws here… Have you used the immediate window to test for null for these fields (ie. ? isnull(field name) (or is it FieldName = null?)? Do the tests before and after the sql runs.
By the way, the for loop is the better tool for counting type loops. It has a counter built in. You can replace the do with a for and be clearer and simpler (for b = 1 to 3).
Other than that, I’m clueless at the moment.
-
WSLarryEngles
AskWoody LoungerYou have the counter “b” which starts at 1 and goes to 2 – what that has to do with the number of records isn’t clear, but is it possible that with only a single record that the second pass never runs?
The counter loops thru the 3 controls. I think the procedure is invoked once per record.
-
WSLarryEngles
AskWoody LoungerThe ; is good practice in SQL, but not compulsory.
It become more relevant when writing Procedures in SQL Server and other databases.Interesting. I just eliminated the “;’ in an SQL statement and it worked. I could have sworn that it did not use to work (that could have been anywhere from Access 1.0 onward). Any knowledge about that or was I just imagining it?
-
WSLarryEngles
AskWoody LoungerTry stepping through the code with a single row being pasted. Look at the values before and after the SQL statement. If it does not behave as you expect, then take that exact SQL into a standalone query and do some testing.
One thing I notice – the semicolon at the end of the SQL is missing. I was not aware of it being optional. Add it and test.
-
WSLarryEngles
AskWoody LoungerTip: If you use the QBE Grid/designer, you can double click on the Titlebar of the Field list. That will select all of the fields in the field list and then you can easily drag them all down into the grid and then delete the ones you don’t want.
Bob OxfordHere I’ve been a developer since version 1.0 and I just learned something new. Thank you.
Also found that you can select the fields in the usual way (using shift and control keys) to select a range or non-consecutive fields and drag them down. Control/A works too! Cool!
-
WSLarryEngles
AskWoody LoungerIs the code being run for the single case? Have you stepped through the code in debug mode in that case? If not, you should.
-
WSLarryEngles
AskWoody LoungerOne thing come to mind: With a single row paste, when does the record get committed (saved)? And on what event does the code run? And does the code get executed for the last record always? If 773 records are pasted, is the 773rd properly filled in?
Some details might help us all to help you figure out what is occurring.
![]() |
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
-
Hello Windows…My Problem is Windows Hello…
by
rdleib
1 hour, 2 minutes ago -
New Canon Printer Wants Data Sent
by
Win7and10
1 hour, 20 minutes ago -
I set up passkeys for my Microsoft account
by
Lance Whitney
27 minutes ago -
AI is for everyone
by
Peter Deegan
53 minutes ago -
Terabyte update 2025
by
Will Fastie
6 hours, 14 minutes ago -
Migrating from Windows 10 to Windows 11
by
Susan Bradley
5 hours, 19 minutes ago -
Lost sound after the upgrade to 24H2?
by
Susan Bradley
1 day ago -
How to move 10GB of data in C:\ProgramData\Package Cache ?
by
Alex5723
35 minutes ago -
Plugged in 24-7
by
CWBillow
10 hours, 4 minutes ago -
Netflix, Apple, BofA websites hijacked with fake help-desk numbers
by
Nibbled To Death By Ducks
1 day, 13 hours ago -
Have Copilot there but not taking over the screen in Word
by
CWBillow
1 day, 10 hours ago -
Windows 11 blocks Chrome 137.0.7151.68, 137.0.7151.69
by
Alex5723
3 days, 4 hours ago -
Are Macs immune?
by
Susan Bradley
1 day, 2 hours ago -
HP Envy and the Function keys
by
CWBillow
2 days, 12 hours ago -
Microsoft : Removal of unwanted drivers from Windows Update
by
Alex5723
5 hours, 25 minutes ago -
MacOS 26 beta 1 dropped support for Firewire 400/800
by
Alex5723
3 days, 15 hours ago -
Unable to update to version 22h2
by
04om
1 day ago -
Windows 11 Insider Preview Build 26100.4482 (24H2) released to Release Preview
by
joep517
3 days, 23 hours ago -
Windows 11 Insider Preview build 27881 released to Canary
by
joep517
3 days, 23 hours ago -
Very Quarrelsome Taskbar!
by
CWBillow
3 days, 9 hours ago -
Move OneNote Notebook OFF OneDrive and make it local
by
CWBillow
4 days, 12 hours ago -
Microsoft 365 to block file access via legacy auth protocols by default
by
Alex5723
4 days, 1 hour ago -
Is your battery draining?
by
Susan Bradley
7 hours, 3 minutes ago -
The 16-billion-record data breach that no one’s ever heard of
by
Alex5723
1 day ago -
Weasel Words Rule Too Many Data Breach Notifications
by
Nibbled To Death By Ducks
4 days, 16 hours ago -
Windows Command Prompt and Powershell will not open as Administrator
by
Gordski
18 hours, 33 minutes ago -
Intel Management Engine (Intel ME) Security Issue
by
PL1
4 days ago -
Old Geek Forced to Update. Buy a Win 11 PC? Yikes! How do I cope?
by
RonE22
3 days, 17 hours ago -
National scam day
by
Susan Bradley
2 days, 23 hours ago -
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
3 days, 20 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.