The Movie Database Support

Hello all, I am using Access VBA to access movies information using the API, it is working fine but i have a problem with attributes in the JSON that have as name the word "name" which is a reserved word.

let's say i want to access the production companies, i am using this code, it is working fine if i want to get the id, but it doesn't work if i am trying to get the names because the word "name" is a reserved word, does anyone have an idea how to fix it?

Thank you

this code is working fine: Set Keys1 = VBA.CallByName(jsonDecode1, "production_companies", VbGet)

              movie_companies = ""
              For Each Key In Keys1
                movie_companies = movie_companies & Key.id & ","
              Next

this code is not working: Set Keys1 = VBA.CallByName(jsonDecode1, "production_companies", VbGet)

              movie_companies = ""
              For Each Key In Keys1
                movie_companies = movie_companies & **Key.Name** & ","
              Next

this is the json:

production_companies: [ { name: "France 2 Cinéma", id: 83 }, { name: "SBS Productions", id: 8997 }, { name: "Les Films Français", id: 16782 } ],

3 replies (on page 1 of 1)

Jump to last post

Hi @neji_mehrez,

Unless someone familiar with Access happens to stumble on this post, you probably won't get much action here (I am not familiar with it). For language specific issues I usually suggest posting over at something like Stack Overflow.

I will, thank you for your help :)

Hi @neji_mehrez

I am in the process of doing exactly what you are talking about.

Any possible way we could communicate and/or share code?

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login