Web forms can use VBA forms? (1 Viewer)

CJ_London

Super Moderator
Staff member
Local time
Today, 11:16
Joined
Feb 19, 2013
Messages
16,663
explanation seemed clear enough to me. Although I'm assuming the poster is right

you can't convert a vba form to a web form
you can't convert a web form to a vba form
you can, by creating a new web db, import pre-existing vba and web forms from other db's
a web form can open a vba form
a vba form can open a web form
a web form cannot use vba modules
 

AccessJunkie

Senior Managing Editor
Local time
Today, 03:16
Joined
May 11, 2006
Messages
278
Hi Uncle Gizmo,

Which specific question were you wanting answered?

Your subject line question is "Web forms can use VBA forms?"

I assume here this is concerning Access 2010 style web databases. The answer to that question is no, Access 2010 style web forms can't use VBA. You can only use web compatible macros with web forms.

The other thread you referenced though has a question about converting a web form to a 'normal' form. The answer to that question is yes, you can easily convert a 2010 style web form to a client form without any loss of functionality.

--------------------
Jeff Conrad - Access Junkie - MVP Alumnus
Senior Managing Editor - Modern Assistance and Support Experience - Microsoft Corporation

Author - Microsoft Access 2013 Inside Out
Author - Microsoft Access 2010 Inside Out
Co-author - Microsoft Office Access 2007 Inside Out
Access 2007/2010/2013 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/en-us/legal/Copyright/Default.aspx
----------
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 11:16
Joined
Jul 9, 2003
Messages
16,341
I found it completely by accident whilst exploring a completely different question. So I was basically making a log of the information. Re-reading the question again, this bit intrigues me:-

>>>The web based forms will not allow VBA to be used, but they can open/use forms that are VBA forms.<<<

I suspect this means that a web form can ONLY open a VBA form and that's it. However, it sort of reads like it could do something else with a VBA form? Hence my intrigue....
 

AccessJunkie

Senior Managing Editor
Local time
Today, 03:16
Joined
May 11, 2006
Messages
278
Hi,

Ok, let's tackle that question then in more detail:

>> The web based forms will not allow VBA to be used, but they can open/use forms that are VBA forms.

I'm assuming again here that we are talking only about Access 2010 style web databases and web forms. Access 2013/2016 style web apps are a completely different type of application. Forms (views as they are called in web apps) in that context are nothing like what you would think of traditional type of Access desktop forms.

For web forms in 2010 style web databases they cannot use or consume any VBA at all. Nothing. You can only use web supported macro actions and expressions for automating your web forms in this environment. This same restriction is in place even if you open up this web form within Access (not opening it in the browser). You can't use VBA with these.

However, in web databases, there is a an expression you can use in web forms called IsClient(). This expression which returns a simple true/false indicates if the web form is currently being displayed within the Access shell (true) or if it is being displayed within a web browser (returns false).

Using this expression you could have macro logic in your web form that opens up a client form that has all kinds of VBA attached to it. Keep in mind though you're just going to be able to open the client form; the web form still won't be able to use or consume any VBA.

If I created a simple web macro that used OpenForm macro action to open a client form (with VBA) and tried to run that macro *in the browser*, Access Services would simply throw an error saying it couldn't find that client form because it would not be an object compiled into the system table. Client forms can't be rendered in the browser.

I have a working example of using the IsClient expression with an IF statement in one my big web databases. If you double click a specific label on a web form, then I have a macro action test with IsClient to see the context. If it returns True then I know the web form is currently displayed in Access. I then open a client form which allows the user to do some specific tasks only within the full Access desktop environment. If the expression returns False since the web form is currently displayed in the browser, then nothing happens at all. The end user is completely unaware that something was supposed to happen there.

Does that help answer your question?

--------------------
Jeff Conrad - Access Junkie - MVP Alumnus
Senior Managing Editor - Modern Assistance and Support Experience - Microsoft Corporation

Author - Microsoft Access 2013 Inside Out
Author - Microsoft Access 2010 Inside Out
Co-author - Microsoft Office Access 2007 Inside Out
Access 2007/2010/2013 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/en-us/legal/Copyright/Default.aspx
----------
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 11:16
Joined
Jul 9, 2003
Messages
16,341
>>>Does that help answer your question?<<<

I'm not sure it's anything I would use but it's interesting nevertheless!
 

Users who are viewing this thread

Top Bottom