Can't link a VBA function to a button in a Form (1 Viewer)

ghnogueira

Registered User.
Local time
Today, 13:31
Joined
May 30, 2014
Messages
10
Hi there. I need some help in Access 2013.

I have used an example DB from within Access to be able to control assets. The example DB created pretty much everything I needed, except for a few things I adapted along the way.

One thing I need to create is a VBA routine to automatically import data from an Excel sheet to a table inside the DB. I already have that code, so that is not the problem.

My problem is the way this example DB was created (a kind of "Web form" or something like that - which I do not have too much knowledge of), whenever I choose a button (or any other item) inside the forms (on this case, the form "Importar2") and go to the Event tab, there's no option to link it to a VBA code (link "Event procedure"). The drop down menu is blank. I can only click the three dots and go to the macro creator.

I have tried creating another form ("Importar"), with the standard design, and I could link the button to the VBA code normally. Thing is I can't seem to add it inside the main menu form ("Principal"). It only accepts those web forms, which do not accept a direct link to a VBA code. So I'm kinda stuck here.

I have attached the DB here, and would gladly accept any help to achieve my goal on this DB, be it either:

  1. Find a way to link an item in a web form to a VBA function
  2. Find a way to insert the regular form inside the web form "Principal"
  3. Create a macro to import the contents of an Excel file to a table inside the DB

Or any other way you guys might know of I haven't thought about.

Thank you very much in advance!
 

Attachments

Normal forms that you can run VBA from are under the 'Client Forms' drop down.
 
Normal forms that you can run VBA from are under the 'Client Forms' drop down.
Hi. Thanks for the tip, but I can't seem to make normal forms show in the "principal" tab. If you download the test DB you can understand that.
 
I'm not familiar with Access's Web Forms.
But I know that VB and the web don't really go together and Access and the web don't really go together and while inserting a web page into a form might make some sense, inserting a form into a web page wouldn't.

Is there a particular reason why you want to use web forms?
 
I'm not familiar with Access's Web Forms.
But I know that VB and the web don't really go together and Access and the web don't really go together and while inserting a web page into a form might make some sense, inserting a form into a web page wouldn't.

Is there a particular reason why you want to use web forms?
Not really. As I mentioned in the begginning of the topic, I opened an example DB available from Access' home page and it imported the model and created the DB as the model was created. I just looked for a model that somehow looked like what I wanted to do.
 

Users who are viewing this thread

Back
Top Bottom