I’m not an Access geek. I’m a FileMaker geek and a sort of middle-school-level SQL geek, therefore with some good fundamentals for understanding databases in general, but definitely not Access-specific stuff.
I fetched the values for four columns’ worth of values using an outside-of-Access technique, and placed the results in a CSV (comma-separated-values) file in a folder.
Figured out – eventually – how to import the CSV file as a new table in Access, by typing “Import Text File” in a prompt area that said “What do you want to do?” and walking through the import wizard thingie. Technically I went with “Link to the data source by creating a linked table” so the data itself isn’t really IN the Access db.
Now I’m stuck, trying to tell Access to update the existing records in a table called “Programs” with the values that are in the CSV file.
Name of source table: GoatOutPrograms
Names of fields to be updated in Programs: Latitude, Longitude, XCoordinate, YCoordinate
Names of source fields in GoatOutPrograms to populate the above with: Latitudex, Longitudex, XCoordinatex, YCoordinatex
Names of fields that define the relationship between Programs and GoatOutPrograms:
Programs.Program_ID = GoatOutPrograms.Program_IDx
SQL statement I’ve cobbled together that isn’t working:
UPDATE Programs INNER JOIN GoatOutPrograms ON Programs.Program_ID = GoatOutPrograms.Program_IDx SET Programs.Latitude = GoatOutPrograms.Latitudex, Programs.Longitude = GoatOutPrograms.Longitudex, Programs.XCoordinate = GoatOutPrograms.XCoordinatex, Programs.YCoordinate = YCoordinatex
WHERE (((Programs.Latitude) Is Null) AND ((Programs.Program_ID)=[GoatOutPrograms].[Program_IDx]));
The cobbling-together process was a combination of freehand typing and then dragging a connector in the graphic-object display of the Access query when I saw that my first attempt had not associated Program_ID with Program_IDx properly – and Access created the “INNER JOIN GoatOutPrograms ON Programs.Program_ID = GoatOutPrograms.Program_IDx” clause. Access also added the raft of parentheses and square brackets that I did not type.
It “runs” but after it has run the rows in Programs do not have their four columns updated.
[rant]
God I hate Access. This would take 30 seconds if I could the tools I know how to use. I suppose my lack of familiarity with Access isn’t a failure on its part but I have to say it’s one of the most user-hostile environments I’ve encountered.
[/rant]