Retrieving Real-Time Data Using a Web API in Microsoft Access
HTML-код
- Опубликовано: 8 сен 2024
- In this Microsoft Access tutorial, I'm going to teach you how to use a little VBA code to go out to the web and retrieve data using something called a web API. The example we're going to use today involves going out to an internet time server and getting the exact time, but this technique can be used for tons of different things, including interacting with ChatGPT.
BECOME A MEMBER:
RUclips: / @599cd
or My Site: 599cd.com/THMe...
LEARN MORE:
Web API: 599cd.com/WebAPI
PREREQUISITES:
Intro to VBA: 599cd.com/Intr...
LINKS:
World Time API: WorldTimeAPI.org
Text Messages: 599cd.com/SMS
Daylight Saving Time UTC: 599cd.com/UTC
RECOMMENDED COURSES:
Access Developer 32: 599cd.com/ACD32
FREE TEMPLATE DOWNLOADS:
TechHelp Free Templates: 599cd.com/THFree
Blank Template: 599cd.com/Blank
Contact Management: 599cd.com/Cont...
Order Entry & Invoicing: 599cd.com/Invo...
More Access Templates: 599cd.com/Acce...
ADDITIONAL RESOURCES:
FREE Access Beginner Level 1: 599cd.com/Free1
How to Use Access in 30 Minutes: 599cd.com/30Mi...
$1 Access Level 2: 599cd.com/1Dollar
Donate to my Tip Jar: 599cd.com/TipJar
Get on my Mailing List: 599cd.com/YTML
Contact Me: 599cd.com/Contact
TechHelp: 599cd.com/Tech...
Consulting Help: 599cd.com/DevNet
Twitter: / learningaccess
en.wikipedia.o...
products.offic...
microsoft.com/...
KEYWORDS:
access 2016, access 2019, access 2021, access 365, microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, Retrieving Real-Time Data, Web API, Data Retrieval with VBA, Real-Time Data Access, Web API in Access, Microsoft Access Web API Tutorial, Access VBA Web API Example, Web Data Integration, Access Data from Internet, Microsoft Access Time Retrieval, Internet Time Using VBA, Access Web Data with VBA, ChatGPT Integration, Real-Time Data Access with Access, Access VBA Web API Fetch, Web API Data Retrieval in Access, VBA Code for Web Data Retrieval, Access External Data, Microsoft Access Data Integration, Internet Time Retrieval Tutorial, Access Web Data Fetching.
QUESTIONS:
Please feel free to post your questions or comments below. Thanks.
Yes, it's backwards 🤣 You are the best Richard. Straight-forward, non-edited, and entertaining with solid information.
Richard, this is great! Thanks for sharing, had no idea how to do it!
Very interesting! I've heard about APIs, but haven't programmed any with them. Thanks for the great video Richard!
Yes please do a seminar on WEB API! My database application is starving for it 😅!
Rick, as always your lessons are excellent information. I have always felt that you are genuinely concerned for your members. I see that by the way you teach and the way you talk to your members. Please keep up the great work!! and thanks
Thanks Richard! Perhaps will be interesting a video about retrieving data from websites with different codepages or internacional caracters? ;-)
Superb Richard, you have excelled yourself this time. Any chance of you doing a video of using it to get stock prices etc?
Hi Richard. Uh, just one thing. You are returning the UTC date time not the date time relative to the user's time zone.
I believe you should be parsing "datetime" instead of "utc_datetime" for the general purpose of this function.
If I ask the time in "Asia/Bangkok" from Hawaii I would NOT get the time now in Bangkok but the time relative to UTC.
Just thought I would mention that detail for the benefit of viewers that may extend this functions utility.
Here's the modified code:
S = ResponseText
L = InStr(S, "datetime:")
S = Right(S, Len(S) - L + 1)
S = Left(S, 42)
S = Mid(S, 16, 2) & "/" & Mid(S, 19, 2) & "/" & Mid(S, 11, 4) & " " & Mid(S, 22, 8)
Thanks for ALL of your content!
Excellent !!! Thank you.
Awesome, Thanks
Hello Richard, first Thank you very much for the excellent guide , I wanted to ask please if there is a guide with XML or json ?
I do cover XML in a lot of my different lessons. See this page for details: 599cd.com/search/?Q=xml
As far as JSON goes, I've covered it in a few of my lessons but not as extensively. 599cd.com/search/?Q=json
Great video, the only problem I have is that as I live in England its giving me the time an hour behind, because we have to move the clocks back and forward an hour, is there a way to add an hour to the time and then take it off when needed.
Hi sir how do you add the primary key in that statement to get the sum for each member? Dsum("feecollected",table1","term='term1'") please help. Thank you!
Hello Richard, where can I find the older video about API, you mentioned?
I don't recall offhand it's been a while since I recorded this can you give me a time index in the video where I mention it and maybe it'll drag my memory? Without watching the whole video again I really can't tell you.
Usually if it's something that I mentioned in the video I put the link in the description down below the video window
20:24. I would like to know, how to get three kinds of data to three fields.🙏 @@599CD
Great stuff Richard! Question: The site I want to use this code for requires an Key. How would I us that in the get statement?
Did a little digging. The answer is you put a "?api_key=xxxxxxxx" at the end of the URL.
You'd probably have to add a header to your request, or you might need to go through an Oauth process which is a bit more complex. If it's simpler, then you might only have to add the key as a parameter in the url, so that's url?key=parameter&another=anotherparameter.
That's one method that may work (not always). I'll be showing another method in the Open AI ChatGPT video coming soon.
I've got a puzzler semi-tackled
XML with DTD, pulled by API externally, stripped of DTD, then imported.
Since the whole database load is 1.25 million records I have to select smaller chunks, and import one after the other...
Sadly I can specify a date and still get duplicate of old information as they stick on new dates, and it's so much a mess to see what's changed, I flush and refill. It would be nice to not get it with DTD but it's a service on trial and they haven't shown how to avoid DTD
Webhooks, if available from the service, are a good way to get notified of updates. You obviously need to code a page on your website to receive the hook and parse and process the data into your tables. It might just be to set a flag to indicate a records has been updated, and then you retrieve only the updated records and set the flag back to 0.
I would like to consume information via API directly through MsAccess without using third-party software or ODBC connection, and I would like to know if I can do this using Supabase, Firebase or others, is it possible? I sent a message in Brazilian Portuguese because I didn't realize it was English. hahaha
But tell me if it's possible and if it's better, make an example video, it helps a lot for people who like msaccess but want to integrate with web applications like flutterflow, flutter, etc.
Grateful.
I've never used any of those services, but if they have an API, you should be able to read it with VBA.
@@599CDThank you, I'll research more, they do have an API, I already use it but I develop in PHP and Flutterflow, I just wanted to make my systems integrate.
Is there an option, that button can be placed on Web Page and by clicking it's done the same process?
Thank You!
That falls under web development and not something Access would do, but yeah, sure, you can do it with your website. I do it all the time using ASP.
@@599CDone more question please..., is it posible to compare values from textbox in access form with some "textbox" on web page by clicking button in the same access form?
Thank You
For some reason my ResponseText returns the real time data just fine but the data has curly brackets around the entire string. There must be a there a reason for this? thanks.
Yep most web servers respond with JSON text. You'll have to remove that yourself.
I ask permission from you a lesson to explain the tool of tree note ples
Huh?