Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / September 2003

Tip: Looking for answers? Try searching our database.

direct vba window in an access form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stephan Gehrlein - 11 Sep 2003 11:13 GMT
Has anybody an idea how I could execute VBA procedures or functions from an
access 2000 ade form?
I would like to generate a hidden administrative form with a text field to
put in vba procedure calls and execute them from an ade without having
access to the vba editor.
So this way I could run something like:

clsUser.New_User("username", "userPW", "userrole",...) or other procedures
or functions.

How do I have to write the code for that text field, how do I execute the
VBA string by code?

Thanks for any suggestions
Stephan
BJ Freeman - 11 Sep 2003 17:19 GMT
For the whole form look at form_load
for a field look at  fieldname_gotfocus.
to get there rt click on the form/file and select buildevents.
then look in the dropdown in the upper right corner.

> Has anybody an idea how I could execute VBA procedures or functions from an
> access 2000 ade form?
[quoted text clipped - 11 lines]
> Thanks for any suggestions
> Stephan
Stephan Gehrlein - 18 Sep 2003 08:09 GMT
Thank you for your reply, but I wasn't looking for an event to fire
VBA procedures or functions, I am looking for the command which
executes VBA code that I put as a string into a textfield of a form.
Do you have any hints on that?

Thanks in advance
Stephan

> For the whole form look at form_load
> for a field look at  fieldname_gotfocus.
[quoted text clipped - 17 lines]
> > Thanks for any suggestions
> > Stephan
Paul Simon - 18 Sep 2003 19:33 GMT
Perhaps the script control on the form?

Paul
> Thank you for your reply, but I wasn't looking for an event to fire
> VBA procedures or functions, I am looking for the command which
[quoted text clipped - 25 lines]
> > > Thanks for any suggestions
> > > Stephan
BJ Freeman - 18 Sep 2003 20:16 GMT
you can not, as far as I know, put a sub /function in string and call it.
However you might look at WithEvents, and see if it will help you.

> Thank you for your reply, but I wasn't looking for an event to fire
> VBA procedures or functions, I am looking for the command which
[quoted text clipped - 25 lines]
> > > Thanks for any suggestions
> > > Stephan
Stephan Gehrlein - 22 Sep 2003 10:29 GMT
Found a way:
eval("string") for functions and
run(vbastring,parameter1,parameter2,....parameter30) for procedures!
works fine except for class functions and procedures. In these cases
you have to generate a kind of buffer procedure to call the class
procedure from there:
e.g.: public function call_class_functionx
call_class_functionx = clsclass.functionx()
end function

Thanks for everybody's help
Stephan

> Thank you for your reply, but I wasn't looking for an event to fire
> VBA procedures or functions, I am looking for the command which
[quoted text clipped - 25 lines]
> > > Thanks for any suggestions
> > > Stephan
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.