How do I save a module in Visual Basic for Access

B

BobS

I wrote a VB module attached to an event on a form. The name appeared in the
navigation pane as a module. It was working fine. I clicked on "File" on the
tool bar and "Save DBname". A list of thing came up which appear to be thing
tht I had changed or had open. some were highlighted, some were not. It
asked for a name for module1 which I entered. It appeared in the navigation
window. I did this several times as I worked on different modules. a couple
of times I un-hihglighted things that I didn't want to save changes in. As I
moved along I noticed that some of my modules had disappeared from the
navigation pane. I can't find them. At no time did I do anything
intentially to delete any of the modules. what happened and how do I save a
module so it won't dissapear? I assume tht the other modules are long gone.
 
P

Piet Linden

I wrote a VB module attached to an event on a form.  The name appeared in the
navigation pane as a module. It was working fine.  I clicked on "File" on the
tool bar and "Save DBname".  A list of thing came up which appear to bething
tht I had changed or had open.  some were highlighted, some were not.  It
asked for a name for module1 which I entered.  It appeared in the navigation
window.  I did this several times as I worked on different modules. a couple
of times I un-hihglighted things that I didn't want to save changes in.  As I
moved along I noticed that some of my modules had disappeared from the
navigation pane.  I can't find them.  At no time did I do anything
intentially to delete any of the modules.  what happened and how do I save a
module so it won't dissapear?  I assume tht the other modules are long gone.  

If you created the module by opening the form and then selecting the
control and event you wanted to attach the code to, then the module is
saved with the form - you don't need to save it outside of that. If
you open a code module, you should be able to see all the modules and
all the functions/subs in them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top