You can calculate that field in the UNION.
SELECT field, "Death" AS Source FROM Deaths
UNION SELECT field, "Birth" FROM Births;
You can calculate that field in the UNION.
SELECT field, "Death" AS Source FROM Deaths
UNION SELECT field, "Birth" FROM Births;
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Ha, genius, that worked, thanks.
My birth records have a birth date and/or a baptism date. The default field I use in my Union Query is birth year, but that returns a blank cell when I only have the baptism year. Is there a way I can say "use birth year, if blank use baptism year"?
Ok, now I've just done something to confuse Access. I changed a header in by Births table which affected the Births Query and the Union Query - now both display "#Name?". I tried switching to design view to edit the query, but it won't let me. I tried changing the header in the table back to what it was and refreshing, but that hasn't worked...?
I suggest you learn some database/access concepts to help you with your project.
See this series by Ronald Rost on youtube for an Introduction to Access.
See links here for more on database and design. Included are links for an advanced VBA series by Steve Bishop.
If the field name that is changed was used in an expression in Births query, it is possible the expression will not autocorrect. It should autocorrect if just pulling the field into the query.
Switch to SQL View to type the correct field name.
UNION will not autocorrect at all.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Dates Are Dates. A Table Containing A Date Field Should Be Set To A Date. Example: BirthDate Field Should Be Set As A Date Field.