Posts Tagged 'Forms'
Saturday, October 16th, 2010 |
After some time without updating the Blog, I finally got some time to update the sales system. Many readers could not get due to the system login password asked. So, I removed the login system for easy access.
Apart from this change made the following changes:
V 0.5.0 (2010-08-19)
- Removed the login and users.
- Added fields (family, iva and unity) in the products table.
- I created a table of VAT.
- Amendment of the Products form. (New fields, look, new way to find records).
- I created the table family (of products).
- Changed the form of shopping is only inserted one product at a time. I put in the form of purchasing a subform where you can enter multiple products purchased in a given supplier.
Download: 2010 Sales
All comments in a new update to fix or add features.
In the future I'm thinking about changing the location of where are the downloads of files, since if there is activity in a file for some time, the file is removed. So I will seek an alternative to easy-share for this not to happen.
In the next post I'll put a version of how to calculate benefits similar to what is already here in this post , but instead of having monthly payments can only choose the number of days elapsing between each installment. This example will also serve to answer a question from a reader ( Marcelo ).
Posted in Examples , Forms , Complete System | 14 Comments »
Saturday, May 2nd, 2009 |
Sometimes it is necessary to prevent a form open if there are records to show, for example when doing a query and no registration is not required, we do not need to be open form since we have no data to display. So what we have to check is whether there are records to show and if there is no show a message and impede the form open. How?
It's easy to just put the code below in the form properties in the event 'to open':
= 0 Then If Form.RecordsetClone.RecordCount
MsgBox "No records found.", VbExclamation, "Error!"
DoCmd.Close acForm, "find data"
Exit Sub
End If
To see an example download: Prevent Form Open
Posted in Examples , Forms , Modules | 2 Comments »
Thursday, December 11th, 2008 |
1 - Create an order form in structure and event 'Clicking' on the properties of the form enter the following: me.keypreview = true
Or is this going to make the keyboard events are received in the first form.
2 - In the form properties, the event 'button below to' put the following code:
Private Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF2
DoCmd.OpenForm "Form1"
Case vbKeyF3
DoCmd.OpenForm "Form2"
Case vbKeyF4
DoCmd.OpenForm "formulario3"
Case vbKeyF5
As Double Dim Calculator
Calculator = Shell ("calc.exe", vbNormalFocus)
Case vbKeyF6
DoCmd.Close
Case Else
End Select
End Sub
What this does is the following:
- By pressing the F2 key opens the form1
- By pressing the F3 key opens Form2
- By pressing the F4 key opens the formulário3
- By pressing the F5 key opens the Windows Calculator
- By pressing the F6 key closes the form
In addition to the function key F1, F2 ... etc, we can also use any other button to perform functions, but keeping in mind that if we are to enter data in a form not suitable to use keys that are used to write data in the fields.
Another thing is that it only works on the form where you put the above codes.
Download: Keys

Posted in Examples , Forms , Modules | 1 Comment »
Saturday, September 20th, 2008 |
This is a kind of menu that allows us to save time, lines of code and a better arrangement in terms of open forms, since with this menu just need an open form. In addition to reducing the number of open forms also decreases the number of buttons in a menu to open each form.
This type of menu, certainly that has existed for some time and is already used by many users of Access.
So where is this menu?
Let's create the menu using a combo box that contains all the forms that we plan to open through it. When you select an option from the combo box the application form is displayed within the subform. Then we begin to make the menu step by step.
1 - Let's create a table where we will store the name you want to give each form and name of the form that will open. In the example I created the table 'tblmenu' with the following fields:
Field Type
Nomedomenu text -> Name that will be seen in the menu (combo box)
form text -> Name of the form that will open
After the data introduced in the example are:
NomedoMenu Form
Accounts Form1
Deposits Form2
Movements formulario3
Account-Box formulario4
Account-Account formulario5
Extract formulario6
2 - Then we create a query from the previous table:
Tblmenu chose the table and then choose the two fields in which we chose for ascending sort nomedomenu to be easier to find the menu quite a few times when we want to open forms. To this query I called 'CsMenu'.
3 - Let's create the form 'Menu', ie choose new form in Design view. Then we create a combo box and change the following properties:
- Number of columns: 2
- Column Widths: 1cm, 0cm;
- Origin of the line: csmenu (which is the name of the query created in the previous paragraph)
4 - In the same form we will create an unbound main form's subform (In the example I called menuquadro). It is this form that will be open each of the forms to choose from the menu (combo box).
5 - Now create a module that will allow us to open the menu that is selected in the combo box in the subform.
We created a module (which I called 'abrirmenu') and pasted the following code:
Public Function AtivarMenu (Combmenu The ComboBox, subabrir The Subform)
Abrirform As String Dim
= abrirform Combmenu.Column (1)
subabrir.SourceObject = abrirform
subabrir.LinkChildFields = ""
subabrir.LinkMasterFields = ""
End Function
After going to the properties of the combo box on the form menu and the After Update event put the created function: ativarmenu = ([Menu], [menuquadro]) that 'Menu' is the name of the combo box and 'menuquadro' the name of the subform.
And finally the menu is ready for use. Just try and use. I hope you enjoyed this tip.
Download: Menu
Below a picture of the menu.
Custom Menu
Posted in Examples , Forms , Modules | 12 Comments »
Thursday, June 19th, 2008 |
This was certainly a player Elton Rueb and he even managed to solve before I help. What the reader was intended to measure the time it takes a user to insert a record and it has three fields: one for the start time when it opens the form, for the first time to end that is inserted when you click the record button and a field to calculate the difference. This is a simple example but may be lacking to those who want to calculate difference between two times. So the Elton Rueb (Rio de Janeiro - RJ - Brazil) provided the example that could help someone else.
Download: Test Time
Posted in Dates , Samples , Examples transferred , Expressions , Form , Time | 2 Comments »
Thursday, June 12th, 2008 |
The reader Jacinto put a question here on how to change the format of a date of 12/06/2008 for 2 0 0 8 0 6 1 2, the response as explained in the comments is as simple as a text box with the following expression:
= Format ([date field name], "mm dd yyyy")
and properties of the field put the following words in the input mask: 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0
Pretty simple and easy. Follow the example for download: Format date
Posted in Dates , Examples , Expressions , Forms | No Comments »
Tuesday, May 6th, 2008 |
This example shows how a management system for the provision of payments.
The example shows that this does is create and automatically with a click of a button, the benefits of a contract of sale through the data entered. That is, we introduce the client's name to the contract start date and the total amount payable. Then simply click the "calculate payments" that it automatically generates the number of installments and divides the value indicated by each of them and calculates the date of each installment (one per month). This is also an example that demonstrates how to add multiple records at once, because when you click the button it adds a record for each benefit.
Download: Insert Multiple Records
Posted in Dates , Samples , Forms , Modules , Records | 17 Comments »
Sunday, April 6th, 2008 |
For those who want to give a different effect on the forms, more specifically when we are entering data, we can change the color of the field where the cursor. That is, all data entry fields are in the white than the field where we are writing that is of another color.
To do this it is very easy, just select the fields and pick the background color you want to appear when the cursor is in the field and then change the color to transparent.
Download: Change color data field
Posted in Colors , Samples , Forms | 10 Comments »
Saturday, March 29th, 2008 |
This is an example of the application fields that Sónia reader intended for a database record data of animals. It is a simple database with just a form for data entry with a photo of the animal.
Download: Animal Shelter
Any change just comment here.
Written Forms , Photos , Modules , Records , Tables | 11 Comments »
Tuesday, March 18th, 2008 |
At the request of the player Joao Cabrita developed this form of control point that applies to a fire station, more specifically to the needs of the reader.
It is a basic example, but with some more advanced details on what it is intended to make the control of entrances and exits of employees, verify that worked a 12 hour shift and add more hours worked and hours worked to less.
All this for a monthly report of attendance of each employee.
Download: Point
Written Consultation , dates , examples , expressions , forms , hours , reports | 9 Comments »