I took a already set up database from the Office.com templates (File –> New –> Office.com Templates), since this template already gave me 80% of my requirements.
I then changed the last 20% of this template where I came into the following: It seems as this template is a web database. I am not sure about the differences of a web database and a normal database in Access at all but I did find out, they do not allow me to run VBA code. At least not when I am trying to call it by an event.
Is there any way to achieve this anyways? Or are there possibly any other ways, such as converting the web database into a normal one perhaps?
Actaully, you can call VBA code from the forms event code. However, it requires a bit of a kluge.
However, you don’t need to do this in your case.
Do note that you can create client objects and use client VBA code in your web application.
This means you can add/mix VBA forms into that application (these client objects of course cannot run in a web brwoser, but they can be used the client).
Suggestion #1:
to hide record navigation buttons.
Open the web form in layout mode. Move a object (dirty the design).
Whack ctrl-g for VBA command prompt. Type in this:
Now, save the form. The record navigation setting will be saved with the form.
Suggestion #2:
Open the web form with VBA. Use this code:
Suggestion #3:
Call VBA code from the forms load event. This is a bit of kluge, but does work:
In the forms open event, place this macro code:
Note that in above WEB MACRO editor the VBA form above called frmRunVBA does NOT appear in the drop down choice list – but you CAN TYPE/force in the name – this is legal.
Now create a VBA form called frmRunVBA). In the forms load event, palce this code:
So you can call VBA code, but you really don’t need to if you use tip#1.