I have a MS Access DB that runs a lengthy Macro. I created a simple Form where the user can click a button which calls this macro. What i can’t find is if i can have this macro update a text box or label on the form that called it; sort of a lame Ajax attempt. I’ve searched online but couldn’t find any samples, but maybe i’m not using the correct terms for what i need. Any suggestions or examples from my fellow geeks?<\/p>","upvoteCount":1,"answerCount":5,"datePublished":"2012-11-07T18:54:57.000Z","author":{"@type":"Person","name":"corbin","url":"https://community.spiceworks.com/u/corbin"},"acceptedAnswer":{"@type":"Answer","text":"
Hi Corbin<\/p>\n
I’m assuming that the code for the macro is in a seperate module rather than the forms module so using me.[textboxname] = “Text” is out of the question.<\/p>\n
In which case you can use Forms![Form Name]![Text Box Name] = “Text”<\/p>\n
Insert that with at different stages in your macro updating the text as relevant. Not quite an animated GIF but at least there is some feedback.<\/p>\n
Gareth<\/p>","upvoteCount":0,"datePublished":"2012-11-08T13:24:45.000Z","url":"https://community.spiceworks.com/t/ms-access-update-text-on-a-form/175724/4","author":{"@type":"Person","name":"gsmith1985","url":"https://community.spiceworks.com/u/gsmith1985"}},"suggestedAnswer":[{"@type":"Answer","text":"
I have a MS Access DB that runs a lengthy Macro. I created a simple Form where the user can click a button which calls this macro. What i can’t find is if i can have this macro update a text box or label on the form that called it; sort of a lame Ajax attempt. I’ve searched online but couldn’t find any samples, but maybe i’m not using the correct terms for what i need. Any suggestions or examples from my fellow geeks?<\/p>","upvoteCount":1,"datePublished":"2012-11-07T18:54:57.000Z","url":"https://community.spiceworks.com/t/ms-access-update-text-on-a-form/175724/1","author":{"@type":"Person","name":"corbin","url":"https://community.spiceworks.com/u/corbin"}},{"@type":"Answer","text":"
Hi Corbin<\/p>\n
I have made previous attempts at this myself with frustrating results. The main issue I found is that VBA couldnt run two procedures overlaying, i.e. one to update the text box, the other your actual macro.<\/p>\n
My previous working was to include the code to update the text box within the Macro itself at key stages. As apose to writing code outside the macro to run over the top.<\/p>\n
Hope that helps.<\/p>\n
Gareth<\/p>","upvoteCount":0,"datePublished":"2012-11-08T11:38:49.000Z","url":"https://community.spiceworks.com/t/ms-access-update-text-on-a-form/175724/2","author":{"@type":"Person","name":"gsmith1985","url":"https://community.spiceworks.com/u/gsmith1985"}},{"@type":"Answer","text":"
Yes, this has been very frustrating. So, you did get code to run in the macro that updated the text box? Can you show me a sample so i know where to start?<\/p>","upvoteCount":0,"datePublished":"2012-11-08T13:20:33.000Z","url":"https://community.spiceworks.com/t/ms-access-update-text-on-a-form/175724/3","author":{"@type":"Person","name":"corbin","url":"https://community.spiceworks.com/u/corbin"}},{"@type":"Answer","text":"
Perfect, i’ll give that a try!<\/p>","upvoteCount":0,"datePublished":"2012-11-08T13:27:25.000Z","url":"https://community.spiceworks.com/t/ms-access-update-text-on-a-form/175724/5","author":{"@type":"Person","name":"corbin","url":"https://community.spiceworks.com/u/corbin"}}]}}