MS Access Customer Database Template Documentation Introduction The MS Access Customer Database Template provides you with a complete tool for managing customers, invoicing, ordering and inventories. In addition it manages a security system (Login and password) for each user of your database, a report manager, an email manager. It also includes a handy parameters manager to store all sorts of data and a function to retrieve them. In the next section we will see in details all the parts of this database. But first How do you start with this database? Steps in starting to operate this database 1. Enter your business info (Name, address, phone, email...) - button Info business. 2. Set the parameters - button Parameters. Enable/disable Security, Tax, Padlock On (to lock the main form so you have to unlock before editing) Enable/disable the tax(s) Tax 1 Applicable and Tax 2 Applicable. Enter the tax(s) rate. Enter the tax(s) label. Tax 1 Label and Tax 2 Label Some businesses do not keep inventory items. As soon as they make a sale, they create an order to there supplier for this sale. To enable/disable this feature, check/uncheck the Create order from invoice parameter. 3. Begin by entering the supplier if you know them. 4. Then enter all you re product. Open the product form and fill in the data. (Product number, Description, Unit of measure, Wholesale price, Retail price, Qty min, Qty max, Primary supplier) 5. If you keep an inventory, open the adjustment window and enter your initial adjustment for each of your product to show the quantity you currently have in stock. 6. Enter the customer if you already have a list of active customer. 7. Then you can begin to create sales (invoice). 8. You can create orders to refill you re inventory. You can print a list of Product to be ordered that will be sort by Primary supplier. This list is in the Report manager in the Product Tab. Security system On opening of the database, a form will appear so you can enter a login and password. There is already a admin user in this database with the password being 1234. If you check the change name and/or password box, the system will ask you to modify your name and/or password after clicking the OK button. Don t forget that you can enable/disable the security system by opening the Parameters Manager and check/uncheck Security line.
If you want to create more users and/or groups, open the security manager and then you can create users and groups
Now to learn to use the security system in the code, open the Security module. You need the three following tables: tblsecuritygroupe and tblsecurityuser and tblparameter In the table tblparameter, you need to set the parameter "Security" to true. You can do this by opening the frmparameters form or directly in the table. There are two level of security that can be implemented in the system. The first level is automated. All you have to do is enter the permission for each group. Every permission is represented by a letter in the group tab as shown above. So enter the letter corresponding to the access level. The second level of security (for targeted security) is optional and needs to be coded in the software using VBA Here are the objects involve to implement the second security level in your project: You need to insert the line of code: CurrentUserID in then "On Open" event of each form you want to implement second level security After you can insert the fowllowing code and do what is needed depending on the group so it would look like that: CurrentUserID If pubcurrentgroup <> "" Then Select Case pubcurrentgroup Case "Admins" Case "Group1 The following lines of code are typical exemples of the way you want a software to behave Me.AllowAdditions=False Not allowing addition for the current form
Me.AllowEdits=True Allowing edition for the current form Me.AllowDeletions=False Not allowing deletion for the current form Me.NoCheque.Locked = True Locking a control so you can t modify it Me.NoCheque.Enabled = False Desabling a control so it is not accessible but it is visible Me.NoCheque.Visible = False Make a control invisible to the end user Case "Group2" Case Else Cancel = True DoCmd.Close acform, me.name End Select End If The main form The main form display all the information about a customer and it also serves as a navigation menu. The buttons in the bottom of the forms give you access at all the data needed to operate the system. Always remind that the main form is locked by default even if you have the permission to edit it. Since it serve as a switchboard this locking system is use to prevent unwanted editing of Customer data. To enable you to edit data you have to open the padlock (bottom right of the form). After
navigating between customers, the form will lock itself automatically. So use the padlock before editing data. You can disable the padlock function by opening the Parameter form and un-check the Padlock On parameter. This way the padlock will always remain open. The rolodex in the left part allows you to navigate between customers. In the Global Search field on top of the form, you can type in a string of character and then press enter. This will display every customer that contains this string in the First name or Last name. For each customer you can type in tasks, contacts (a list of contacts within customer), notes. The tasks you enter for each customer will be display also in the Task summary window. Each task will stay in this window until the Done field is checked. It s like a To do list that is always on top of your main form. You can have a Calendar View of the task to do by clicking the Calendar button at the left of the customer name (that is in red). You can even edit or add task directly from the calendar. The button beside the email field can be use to write an email to a customer. It will open Outlook or Outlook Express Adding a new customer
This forms open when you click on the button New customer of the main form. It allows you to create a new customer. The product form
You can select the product from the list on the left part of the form. To create orders to refill you re inventory, you can print a list of Product to be ordered that will be sort by Primary supplier. This list is in the Report manager in the Product Tab. From there you can take action and create orders for these products. There are three things that affect the quantity in stock for each product: 1- The quantity delivered for each items in a sales order 2- The quantity received for each items in a purchase order 3- The inventory adjustments The value is calculated on a LiFo base (Last in First out). Be sure to check the checkbox "Labor" for the labor type product as this information is used in the quote section of this template to make the difference between labor and non-labor product. You can set selling price scale for different quantities. If you enter for example: Qty = 1 Price = 15.00 Qty = 3 Price = 12.00 This mean that when you create an invoice, for this particular product, for a qty of 1 or 2 the unit price will be 15.00. For a quantity of 3 or more the unit price will be 12.00 If you only have one price. enter it for a quantity of 1. To create a new product, simply click on the New Product button. Also note that the Sub-Category field is only available in the Advanced version. It is used in the quote form in the list of material. The supplier form
The supplier form enables you to create/modify the suppliers that will be used to create orders throughout the system. You can also access directly a supplier by using the field Go to at the right of the navigation button. The report manager
There are 4 tabs on the report manager. Some reports are pre-defines and you can just explore them by clicking on the selected button. The buttons that are filled with can be assigned to any new reports you create. A report called Products to be order can be found in the Product Tab. It s a reminder that shows which product have reach there minimum quantity. From there you can take action and create an order for these products. The quote form (with the Advanced CRM version) The quote form enables you to create 2 types of quote: A summary quote and a detailed quote. 1. A summary quote In this type of quote the task list is independent from the item list. This means that when you print the quote, the list of works is displayed and at the bottom of the quote, the total and taxes are displayed. The total and taxes are calculated from the list of items you choose. You also have the option to print a list of items like if you where printing an invoice.
Working with the summary quote Firstly you can enter the list of works which are the outlines of the quote. You can choose the works from a drop menu. In the masters form (accessible from the main menu) you can fill new entry that will populate this drop down menu. Secondly you enter all the products and quantities that you need to build the quote. You can do that manually or you can generate those entries based on a quote model (see the quote model help section for more details). All you have to do is to choose a model from the drop down list and then click on the "Model generator" button. If the model contains formulas based on a superficy you need to enter them in the corresponding fields before proceeding with the generation. You can use the "Delete all items" button to delete all the products for the current quote 2. A detailed quote The main difference is that you have sub-totals within the task list. The final result is a more detailed quote with different levels / totals associate. In the quote form there is a button (question mark) beside the "Quote type" option group box. This button will open a graphical example of the differences between the 2 types of quote.
Working with the detailed quote The detailed quote works the same way as the summary quote except that the products and quantities you enter must belong to a combination of summary and detail section. If you try to enter a product without firstly choose a summary and detail work section the system will prompt you with a message. The summary and detail work sections are the outlines of the quote. You can choose the works from a drop menu. In the masters form (accessible from the main menu) you can fill new entry that will populate this drop down menu. As in the summary quote type you enter all the products and quantities that you need to build the quote. You can do that manually or you can generate those entries based on a quote model (see the quote model help section for more details). All you have to do is to choose a model from the drop down list and then click on the "Model generator" button. If the model contains formulas based on a superficy you need to enter them in the corresponding fields before proceeding with the generation. For the detailed quote type those fields are assigned to a summary and detailed work section. Here is the logic behind using those fields: First the system will look in the detailed work section if there is superficy parameter. If there is then it will take this parameter. If not, the system will look for a value at the detailed work section level. If there is a value it will take it if not it will set it to 0.
You can use the "Delete all items" button to delete all the products for the current summary and detailed work sections. The models form (with the Advanced CRM version) The model form enables you to create a list of products that will be used to help you when creating a quote. On the quote form there is a "Model generator" button that will copy the product list from the selected model into the current quote you re working on. In addition if the products in the model have related superficies formulas associated to them, the generation will proccess a calculation accordingly. The first column is a line number that will be generated beginning with 1. The second column is where you select products from the product table. The third column can be left blank or you can choose a formula from a drop down list. There are five possible formulas: 1. SupSqFt x Coeff ----> Superficy square feet x Coefficient 2. SupSqMe x Coeff ----> Superficy square meter x Coefficient 3. SupLinFt x Coeff ----> Superficy linear feet x Coefficient 4. SupLinMe x Coeff ----> Superficy linear meter x Coefficient 5. NbrUnit x Coeff ----> Number of unit x Coefficient The fourth column can be left blank or this is where you enter the coefficient that will be used in the formula. If the third and fourth columns are left blank the quantities will be left to 0.
Exemple of how a formula will be apply when using the "Model generator" button from the quote form: Let's say you have a quote model that contains the following product: STONE 0-3/4 For this product you choose this formula type from the drop down: SupSqFt x Coeff Then you enter the following coefficient (based on your own calculation depending on you type of business) 0.2345234 This means that when you trigger the "Model generator" button based upon a model that contains the preceding data it will process the following calculation (for a superficy of let's say 600 square feet) qty of STONE 0-3/4 = 600 x 0.2345234 The sales form
You have to select a customer on the left part of the main form before you can open the Invoice form. If you want to create a new invoice, use the "New invoice" button. If you want to open existing invoices for the selected customer, use the "Existing invoices" button. At this point you can either modify the invoice or create a new one by clicking on the "New Invoice" button. The taxes rates are set at 2 level: Global level (you set them with the "Parameter manager" which can be open with a button on the main form. There is also specific tax rates that can be implemented at the product level (you set them in the "Product form" that can be open with a button on the main form). When you select an item in an invoice the system will set the tax rates following this logic: 1- It will check if taxes are applicable (set in the Parameter manager) 2- If tax are applicable it will get the tax rates (set in the Parameter manager)
3- It will check if there is a different tax rate for this product (in the tblproduct table). If there is one it will take this tax rate. Also there is a discount column on the item part of the invoice form. This field will populate itself from the "Discount on invoice" field on the general tab of the customer form (which is also the main form). The purchase order form When you open the purchase order form, all the orders are retrieved and you can access them with the navigations button at the bottom of the form. You can also access directly an order by using the field Go to at the right of the navigation button. The inventory adjustment form
The inventory adjustment form allows you to adjust the quantity in stock for a product. It can be use at any time but typically it s used either to show the initial qty in stock for a product or when you take a physical inventory of your products and you then want to adjust the value in the database. The image manager (with the Image option CRM version)
The image manager helps you manage a set of images linked to a customer. To access it, click on the image button at the bottom of the main form or in the application ribbon. The image manager opens on a window with a main image and a subform with additional images. To perform an action on an image, use the context menu (right-click) directly on an image field. When an image has been added you can always left-click on it to open a zoom window of it. The images are saved externally in the images folder (that must exist in the same folder then the backend database (TemplateData.accdb)) The context menu give you access to the following task: Copy: Copies the current image to the clipboard. Paste: Pastes an image from the clipboard (if available), replacing the current image. Load: Loads a new image from the filesystem. Save As : Save the current image to a file. Rotate/Mirror: Supports rotating the image in multiples of 90 degrees, or horizontal and vertical mirroring. Delete: Deletes/clears the current image. Zoom In: Zooms in to the center of the image by a factor of 2. Zoom Out: Zooms out by a factor of 2. Zoom to Fit: Zooms the image to fit entirely inside the area of the control. Zoom to Width: Zooms to fit the width of the image inside the control. Zoom to Height: Zooms to fit the height of the image inside the control. Image Info: Shows or Hides the Image Info window, which displays image and EXIF information. The Data Base form
This form is where all the drop-down data is stored. Just select a form in the left part of the windows. You can customize this form and add new groups of data to it. Just go in design mode and explore the way it s done. It s very straight forward and easy to customize. The Email Manager
The email manager let s you create template letters that you can then send to selected customers that have a valid email address or that you can simply print. The first thing you want to do is to choose if you want to use an already existing template or to create a new one. The drop down menu beside the ID label in the top left corner of the window let you choose a template. If you want to create a new template, click on the "New template button" When you create a new template you have to first o o o o o o Enter all the information needed starting with a template description, a subject. Then in the "Message" tab you have to select an action to take and choose if you want to have the company logo or not on the letters (No logo possible on the emails). Then you need to enter the Email / letter settings that will be used to create the message layout. In a new template a default structure with tokens is displayed in the message section. Those token (like ###SALUTATION### for example) can be moved or removed as long as you respect their spelling. Select the customers you want to send emails with the button "Select the customers" Then you can preview your email / letter with the buttons "Preview email" and "Preview letter" When you're ready, press the "Send emails and/or letters to selected customers" to launch the process The email/letter manager uses CDO (Collaboration Data Objects) to send the emails. It does not need a reference to the Microsoft CDO For Windows library. CDOsys comes installed as standard on Windows 2K and higher workstations and servers. You have to make sure your email parameters are properly set. Open the parameter form and make sure the "SMTP server name", "User name" and "Password" are set properly. To verify those settings you could check your Outlook parameters if you use it. You can test the connection with the button "Send a test" on the parameter form.
Optionnaly in the email manager form, you can use the tab "Generate a list of the selected customer email". Click the button "Generate". It will generate a list of the selected customers separeted by ";" and copy the result to the clipboard. You can then paste the text in the "Bcc" section of your email software using your own tool. The Parameters Manager
On opening of the parameter manager form, the "General parameters" are displayed. You can select the parameter category with the buttons at the top of the window. All categories works the same way with the exception of the Scheduler and email category. The "Email" category shows the parameters involved to send emails. To enter your settings, ask your IT support desk OR open your Outlook and check your main account settings. The non-email/scheduler categories are divided in two sections. The top section is for parameters that are set to a true/false. The bottom section is used for parameters that require the entry of a numeric or string value. The function GetPref can be use to retrieve a parameter. Here is an example of how to use this function: Me.ProgramVersion = GetPref("Program version")
The taxes in the system are manage with the help of the parameter manager There are 4 important parameters to manage the taxes "Tax 1 applicable" Is there a first tax in the system "Tax 2 applicable" Is there a second tax in the system "Tax 1" What is the fist tax rate "Tax 2" What is the second tax rate So those parameters have to be set in order for the system to work properly. The Link Manager The link manager enables you to connect to a different set of data. Remember that your system consist of two files 1- Template.mdb or Template.accdb (Template.mde or Template.accde which are compile) is the front end of the system containing the query s, forms, reports and modules. 2- TemplateData.mdb (or TemplateData.accdb) is the database itself containing all your customers and other infos. This setup is ideal in a network environment so more then one computer (each computer having a copy of Template.mde (or Template.accde) that is link to the file TemplateData.mdb (or TemplateData.accdb) somewhere on the server) What is the difference between Template.mdb (or Template.accdb) and Template.mde (or Template.accde)? Answer: Template.mde (or TemplateData.accde) is a compile version of Template.mdb (or Template.accdb). This version is faster an more stable then an mdb or an accdb file. Every time you
make a change to Template.mdb (or Template.accdb) you should create an mde or accde version for the production environment. How do you create a mde file? Answer for Access 2002, 2003: Tools - Database utility - Create an mde file Answer for Access 2007: Database tools - Create an mde file Answer for Access 2010: Select File (BackStage) and select [Save & Publish], then [Save Database As]. How do you link a new table you ve created? Answer for Access 2002 or 2003: In the menu bar select File "Get External Data" Link Table and then browse to the file TemplateData.mdb (or TemplateData.accdb), Select the new table and then OK. Answer for Access 2007 and 2010: Select the External data Tab, and then click on the Access logo. This will open the external data window. Select the file you want to link to. In our case browse to the file TemplateData.mdb (or TemplateData.accdb). Then select "Link to the data source by creating a link table" and click OK. Select the new table and then OK. The Info Business button
This form simply allows you to enter all the informations about your company. This info will be printed in the different reports. The logo have to be a bitmap. You can also write the message that will show on opening of the database, change the back color, the fore color as well as the font.