OK suprarob . . . . .
A few pointers first:
[blue]
Modules[/blue], the foundation of any Application, let you create libraries of Functions & SubRoutines used throughout your application. Functions always return a value! SubRoutines do not. VBA ([blue]Visual Basic for Applications[/blue]), is the language used to write functions & subroutines in a Module.
There are two types of modules, [blue]
Standard & Class[/blue]. [blue]Standard Modules[/blue] are created by going to the modules window and selectind new. Existing [blue]Standard Modules are in this window[/blue]. Class Modules are have a special significance to the programmer, but for now, you just need to know that [purple]
Form & Report Modules are Class Modules[/purple]. You will usually find these reffered to as the Form/Report Module, or Code Module. So . . .
when someone tells you to put some code in a module, they have to specify Form, Report or Standard Module. I usually specify Standard by saying [blue]a module in the modules window[/blue], since I can't depend on quoting Standard to be understood. Note: all editing in modules is done with the VBE ([blue]
Visual Basic Editor[/blue]), which is the editor in control whenever your in a module.
There are several ways to get to these modules so you can edit/copy/paste code. I'll show you how to get there for forms, just bear in mind its the same for Reports:
Open the form in design view. Then on the [blue]Form Design ToolBar[/blue], click the [purple]Code[/purple] button
. This takes you to the [blue]Forms Class Module[/blue]. [purple]
This where you view/edit/copy/paste code for this module.[/purple]
There will be may time you will be told to put code in a specific event of a control on the form. To invoke the event in the form module:
Open the form in design view. Call up the properties for the control. Select the [blue]Events Tab[/blue]. Put the cursor on the line for the event, the click the three elipses button
just on the right. This will take you to the Class Module with the specific event in view.
From here you should be able to copy/paste the code where required. Just remember the second code block is replacing what you posted, and [purple]
don't forget to backup first![/purple]
Since your new to database, be sure at all costs you understand and know the following links. They represent the heart of designing any database and you really should'nt continue until you understand them well!
[blue]
Fundamentals of Relational Database Design[/blue]
[blue]
Normalizing Tables[/blue]
[blue]
Table Relationships[/blue]
[blue]
GoodLuck in your Designs![/blue]
See Ya! . . . . . .