-
WSCronk
AskWoody LoungerIf FORMNAME is a text field you need to use
“[FORNAME] = ” & chr(34) & Me!FORENAME & chr(34))) -
WSCronk
AskWoody LoungerDecember 13, 2013 at 4:23 pm in reply to: Comparing Data Differences Between Two Identical Access Tables #1428776It seems to me you have 3 ways of tackling this
(1) Use Geek’s suggestion to use a query with a join on the common PK and have 100 or conditions a.Field(n) b.Field(n) to locate records with different field contents (if a query can handle that many otherwise a series of queries). And an outer join to show new and deleted records.
(2) Maintain a log of changes as they are made. (This does not help with historical data.)
(3) Use VBA to loop through recordsets comaring field values, the option I’d personally use. -
WSCronk
AskWoody LoungerI haven’t tried it but how about setting the height of a hidden rectangle.
-
WSCronk
AskWoody LoungerWhy don’t you use the same query for the Word mail merge as is used to print from Access? If there was a filter being applied to the Access report, set up the same criteria in your Word Mail Merge filter. Alternatively, change the query in Access to give you just the records you want.
-
WSCronk
AskWoody LoungerOne way might be to position the data sequentially. For example, if you had say up to 21 data items to display, put 21 unbound text boxes in the report called txt01 to txt21, in say 3 columns, 7 rows
Open a recordset with the 21 field values and then loop through the values with the following (air) code in the OnFormat event of the report
intNextPosition = 1
For n = 1 to 21
if len(rst(n-1) & “”)> 0 then
me(“txt” & format(intNextPosition ,”0#”))= rst(n-1)
intNextPosition =intNextPosition +1
endif
next nI expect you’d also want to have labels describing the data being displayed. One way would be to store the label captions for the 21 fields in a string array and add
me(lbl” & format(intNextPosition ,”0#”)).caption= astrCaption(n)or if the field name were descriptive enough
me(lbl” & format(intNextPosition ,”0#”)).caption=rst(n-1).name -
WSCronk
AskWoody LoungerIs the form bound to the table where the data being printed is sourced from? If so then the easiest is to add the field where you want to store your input value and then add to your code after the data has been input:
me.txtAngleBendCert= strMessageOtherwise you can use an update query to add the data to the table.
-
WSCronk
AskWoody LoungerMarch 28, 2013 at 8:01 pm in reply to: How to convert a single field recordset into a VBA variable? #1383823I’m sure it will work.
datMaximum = DMax(“ExDay”,”qryA”)
After executing this, datMax will contain the maximum value in the field ExDay in the data table or query qryA. Doesn’t matter if there is one field or many. -
WSCronk
AskWoody LoungerI can think of a few situations where your database is opened read only
1. Your default setting is such.
2. The database is in a folder which is read only (or a CD) or the folder cannot create the lock file *.ldb or *.laccdb
3. Someone else has opened it exclusively.This list may not be exhaustive.
-
WSCronk
AskWoody LoungerUse Date() in the criteria of the recordsource for the report. Then you don’t need to worry about macros or BA.
As to running the report in the mornings, if you open the database every morning, you could add the report to the Autoexec macro. If not, then you’ll need to set up some scheduler to open your Access db.
-
WSCronk
AskWoody LoungerSeasons greetings Geek
Your intended solution is better because it aims to pick up not only the “X” situation, but any other where there is a Null value.
I think the issue is in the first part of the IIf which should be Nz([Option])=0 Without the test for zero, the result is zero which is False.
Cronk
-
WSCronk
AskWoody LoungerNovember 15, 2012 at 4:04 pm in reply to: Calculate an age, adding # of months if child is not yet 1 year old #1357229There is a problem though catering for leap years with 366 days.
Your a better man than me with complex IIf statements, but the first part would be
IIf(DateSerial(Year(pDOB) + 1, Month(pDOB), Day(pDOB)) <= Date,…..But there seems to be issues with the rest because I get the results below for a birth date of 16 November 2011 (NB UK date format). I'd be using a function.
Cronk
17/11/2011 1
18/11/2011 12 Months
19/11/2011 12 Months
….
29/11/2011 12 Months
30/11/2011 12 Months
1/12/2011 10 Months
2/12/2011 10 Months
…
15/12/2011 10 Months
16/12/2011 11 Months
17/12/2011 11 Months
18/12/2011 11 Months
….
30/12/2011 11 Months
31/12/2011 11 Months
1/01/2012 9 Months
2/01/2012 9 Months
3/01/2012 9 Months -
WSCronk
AskWoody LoungerSeptember 13, 2012 at 4:10 pm in reply to: Opening multiple copies of the same report in the same window #1348946CStr(CLng(Rnd * (2 ^ 31))) is generating a random, and hopefully unique, number which is used as the Key value to the particular instance of the specific report object that you are creating in the collection of reports.
-
WSCronk
AskWoody LoungerWhat defines an “invalid” receipt number? One that does not exist? You could check the existence first (check out DLookup) and if it does not exist, advise the user accordingly.
-
WSCronk
AskWoody LoungerThanks for the steer. I’ll try it and let you know the outcome. But it won’t be for a couple of weeks because I’ve just arrived in Surfers Paradise to thaw out.
-
WSCronk
AskWoody LoungerLook up Access help on DAvg and use the criteria “FieldName Not Is Null”
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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
-
Microsoft-Backed Builder.ai Set for Bankruptcy After Cash Seized
by
Alex5723
1 hour, 12 minutes ago -
Location, location, location
by
Susan Bradley
1 hour, 41 minutes ago -
Cannot get a task to run a restore point
by
CWBillow
2 hours, 38 minutes ago -
What is wrong with simple approach? (Awaiting moderation)
by
WSSpoke36
6 hours, 49 minutes ago -
Frustrating search behavior with Outlook
by
MrJimPhelps
10 hours, 10 minutes ago -
June 2025 Office non-Security Updates
by
PKCano
13 hours, 23 minutes ago -
Secure Boot Update Fails after KB5058405 Installed
by
SteveIT
6 hours, 3 minutes ago -
Firefox Red Panda Fun Stuff
by
Lars220
13 hours, 19 minutes ago -
How start headers and page numbers on page 3?
by
Davidhs
23 hours, 44 minutes ago -
Attack on LexisNexis Risk Solutions exposes data on 300k +
by
Nibbled To Death By Ducks
2 hours, 25 minutes ago -
Windows 11 Insider Preview build 26200.5622 released to DEV
by
joep517
1 day, 8 hours ago -
Windows 11 Insider Preview build 26120.4230 (24H2) released to BETA
by
joep517
1 day, 8 hours ago -
MS Excel 2019 Now Prompts to Back Up With OneDrive
by
lmacri
22 hours, 7 minutes ago -
Firefox 139
by
Charlie
14 hours, 42 minutes ago -
Who knows what?
by
Will Fastie
5 hours, 4 minutes ago -
My top ten underappreciated features in Office
by
Peter Deegan
1 day, 9 hours ago -
WAU Manager — It’s your computer, you are in charge!
by
Deanna McElveen
1 day, 3 hours ago -
Misbehaving devices
by
Susan Bradley
4 hours, 52 minutes ago -
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
2 days, 15 hours ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
12 hours, 26 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
2 days, 13 hours ago -
Discover the Best AI Tools for Everything
by
Alex5723
1 day, 12 hours ago -
Edge Seems To Be Gaining Weight
by
bbearren
2 days, 3 hours ago -
Rufus is available from the MSFT Store
by
PL1
2 days, 11 hours ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
3 days, 14 hours ago -
KB5061768 update for Intel vPro processor
by
drmark
1 day, 14 hours ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
1 day, 13 hours ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
3 days, 10 hours ago -
Office gets current release
by
Susan Bradley
3 days, 13 hours ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
5 days, 3 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.