Access Webserver

Doozer

New member
Local time
Today, 00:21
Joined
Aug 14, 2018
Messages
28
Attached is an Access web server application that I adapted from webxcel project on github. The web server is written entirely in VBA. The attached folder consists of 6 files: 3 Access DB's, and the app files (HTML, CSS, and JSX).

To use the application, open the AccessWeb_BE file and link to the todo table in the AccessWeb_data file, then click the Start Server button. Once the button says "Running...", open the AccessWeb_FE file. The todo app will load at localhost:8080. You should be able to add new, complete, and delete items. When finished, click the stop button in the BE file to clear the port and delete the lockfile.

I just did this as an exercise. Use at your own discretion.
 

Attachments

it is hanging on my pc (BE) when started the server.
 
I got an error, which I am not going to try and reproduce as it then mucked up my diabetes DB that I have open all the time.
Had to restart my computer to try and clear the problem, even then Access said there was an issue last time I tried to open the diabetes db, and did I still want to open it.
Nice idea though.
 
Sorry, I forgot to mention that it hangs around as a background process even after stopping the web server. I haven't debugged that issue yet. Thanks for testing and the feedback.
 
I got an error, which I am not going to try and reproduce as it then mucked up my diabetes DB that I have open all the time.
Had to restart my computer to try and clear the problem, even then Access said there was an issue last time I tried to open the diabetes db, and did I still want to open it.
Nice idea though.
Sorry about that. Hope it didn't corrupt your database.
 
Sorry, I forgot to mention that it hangs around as a background process even after stopping the web server. I haven't debugged that issue yet. Thanks for testing and the feedback.
Unfortunately it never gets as far as starting the Web server. When I click the button, nothing appears to happen. When I click it again, Access just stops responding.
However I've since found that if I step through the StartServer code, it DOES work. So I think you need to add some delays to allow each step to complete before continuing.
 
Last edited:
Unfortunately it never gets as far as starting the Web server. When I click the button, nothing appears to happen. When I click it again, Access just stops responding.
However I've since found that if I step through the StartServer code, it DOES work. So I think you need to add some delays to allow each step to complete before continuing.
The BE file locking up is totally normal. The server is running at that point. It's serving a React todo app at http://localhost:8080. You can open a web browser to localhost:8080, or open the AccessWeb_FE.accdb file, which opens a form at localhost:8080. I've attached a clearer example by disabling buttons and providing clearer instructions in the Status textbox. I also renamed the files to server and client in the attached zip. You will need to link the server to the tables in the data.accdb.

Here is a snippet from the webxcel repo explaining the freezing: "During webxcel's runtime, Microsoft Excel will not respond. This is due to Visual Basic being executed on the main UI thread. As this is a known issue, webxcel creates a lockfile <project>.xlsm.lock, which you can delete to gracefully shut down the server. You also could force-quit Microsoft Excel, but this might result in the port being blocked from further usage until a reboot (webxcel will raise the error ErrorSocketBind whenever it can't bind to a specific port)."
 

Attachments

Last edited:
The instructions are definitely clearer now but the functionality is unchanged for me.
To start the server successfully I have to step through the code one line at a time.
I'm still unable to stop the server - even when I step through that code, Access stops responding.
As before, I'm having to forcibly close the app and delete both types of lock file.
 
The instructions are definitely clearer now but the functionality is unchanged for me.
To start the server successfully I have to step through the code one line at a time.
I'm still unable to stop the server - even when I step through that code, Access stops responding.
As before, I'm having to forcibly close the app and delete both types of lock file.

I appreciate you and everyone trying. Maybe I post a video demonstrating the app.
 

Users who are viewing this thread

Back
Top Bottom