-
WSMark P
AskWoody LoungerThank you for your suggestions. I will try and work out how to redistribute my data as you describe. My difficulty was that I have inherited the data already entered into 3 excel spreadsheets (one for each village) with columns for Household, Index in household, Name, age(male), age(female), hamlet, as this is the format from the village health workers exercise books. I imported this data into access, after considerable cleaning (although there remain many mistakes, unfortunately) which I found easier to do in excel (autofiltering being much quicker than querying). There will be many corrections and additions to be made to this data as well, but I will try and do this through a form with windows on all 3 tables you describe.
Ah – just got it! I had to alias [Household Data].Name as well as [HoH List].Name, so the SQL statement reads:
SELECT [Household Data].[ID], [Household Data].[No], [Household Data].[Household], [Household Data].[Index in House], [Household Data].[Name] AS IndividualName, [Household Data].[Age (Male)], [Household Data].[Age (Female)], [Household Data].[Sex], [Household Data].[Age], [Household Data].[Group], [Household Data].[Thon], [Household Data].[Hamlet Code], [Household Data].[Village Code], [Household Data].[Correct], [HoH List].[Name] AS HoHName FROM [Household Data] INNER JOIN [HoH List] ON ([Household Data].[Village Code]=[HoH List].[Village Code]) AND ([Household Data].[Hamlet Code]=[HoH List].[Hamlet Code]) AND ([Household Data].[Household]=[HoH List].[Household]);
Thank you.
I would still like to find out where I can get an Access SQL reference guide. I have found several online tutorials, which I am following, but the details of the syntax are all slightly different. I also don’t understand why the record source SQL statement appears as above, but to use a SQL statement in VBA (eg to run an update query), lots of ampersands, underscores and quotation marks are involved. Any info gladly received (and might stop me pestering you busy people).
Cheers
-
WSMark P
AskWoody LoungerThank you very much Charlotte, I shall try this.
I have already run into problems with the name Name, but not as a field name, but as a control name, so I have alreay decided not to use it in future.
I have 2 more small questions:
1) If I alias HoHName, how do I then refer to it to display in a control?
2) I am afraid I am a trial and error/Help/newsgroup parasite self taught newbie, and have no idea of SQL syntax (i am also working in a bit of vacuum – techie books are difficult to get hold of here, and the ones that are available are rarely in english). I would be very happy to be pointed in the direction of some references for this, but to address this particular problem, which I would like to to by tomorrow
, what should the syntax be for aliasing the HOH.Name. I have tried just adding AS HoHname after HoH.Name, as in:
SELECT [Household Data].ID, [Household Data].[No], [Household Data].Household, [Household Data].[Index in House], [Household Data].Name, [Household Data].[Age (Male)], [Household Data].[Age (Female)], [Household Data].Sex, [Household Data].Age, [Household Data].Group, [Household Data].Thon, [Household Data].[Hamlet Code], [Household Data].[Village Code], [HoH].[Name] AS HoHName
FROM [Household Data] INNER JOIN HoH ON ([Household Data].[Village Code] = HoH.[Village Code]) AND ([Household Data].[Hamlet Code] = HoH.[Hamlet Code]) AND ([Household Data].Household = HoH.Household);and also tried putting brackets round it, but neither works (the former still gave me the same error, the latter a syntax error on leaving the SQL window).
Sorry to ask such small questions.
Thanks
Sean
-
WSMark P
AskWoody LoungerSorry here’s the SQL statement (as it appears in the Record Source property of the subform):
SELECT [Household Data].[ID], [Household Data].[No], [Household Data].[Household], [Household Data].[Index in House], [Household Data].[Name], [Household Data].[Age (Male)], [Household Data].[Age (Female)], [Household Data].[Sex], [Household Data].[Age], [Household Data].[Group], [Household Data].[Thon], [Household Data].[Hamlet Code], [Household Data].[Village Code], [Household Data].[Correct], [HoH List].[Name] FROM [Household Data] INNER JOIN [HoH List] ON ([Household Data].[Village Code]=[HoH List].[Village Code]) AND ([Household Data].[Hamlet Code]=[HoH List].[Hamlet Code]) AND ([Household Data].[Household]=[HoH List].[Household]);
I thought I’d found the problem when I realised that I hadn’t changed the child link field from Name to {Household Data].Name, but unfortunately after doing so I now receive the error “The specified field'[Household Data].Name’ could refer to more than one table listed in the from clause of your SQL statement. Now I really don’t understand.
Thanks again
![]() |
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
-
Discover the Best AI Tools for Everything
by
Alex5723
3 hours, 10 minutes ago -
Edge Seems To Be Gaining Weight
by
bbearren
5 hours, 29 minutes ago -
Rufus is available from the MSFT Store
by
PL1
14 hours, 8 minutes ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
16 hours, 18 minutes ago -
KB5061768 update for Intel vPro processor
by
drmark
2 hours, 11 minutes ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
14 hours, 29 minutes ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
12 hours, 3 minutes ago -
Office gets current release
by
Susan Bradley
14 hours, 40 minutes ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
2 days, 4 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
1 day, 13 hours ago -
Stop the OneDrive defaults
by
CWBillow
2 days, 5 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
2 days, 15 hours ago -
X Suspends Encrypted DMs
by
Alex5723
2 days, 17 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
2 days, 17 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
2 days, 18 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
2 days, 19 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
2 days, 7 hours ago -
Enabling Secureboot
by
ITguy
2 days, 14 hours ago -
Windows hosting exposes additional bugs
by
Susan Bradley
3 days, 3 hours ago -
No more rounded corners??
by
CWBillow
2 days, 22 hours ago -
Android 15 and IPV6
by
Win7and10
2 days, 12 hours ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
3 days, 15 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
3 days, 18 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
3 days, 12 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
4 days, 1 hour ago -
May preview updates
by
Susan Bradley
3 days, 12 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
3 days, 4 hours ago -
Just got this pop-up page while browsing
by
Alex5723
3 days, 17 hours ago -
KB5058379 / KB 5061768 Failures
by
crown
3 days, 14 hours ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
2 days, 16 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
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.