• No results found

Microsoft Access 2010 Level III

N/A
N/A
Protected

Academic year: 2021

Share "Microsoft Access 2010 Level III"

Copied!
21
0
0

Loading.... (view fulltext now)

Full text

(1)

LaGuardia Community College

31-10 Thomson Ave, Long Island City, New York 11101

Created by ISMD’s Dept. Training Team.

Microsoft Access 2010 Level III

Handout Objectives

I. Creating a Password Table

II. Designing a Form

III. Entering Codes

Overview:

With its Microsoft Office Fluent user interface and interactive design capabilities that do not

require a deep database knowledge, Microsoft Office Access 2010 helps you track and report

information with ease.

I. Creating a Password Table

1. From the Access File Tab, Click Blank database enter the File name “Company Login Database”and choosea locationfor storing the new database, Click Create.

(2)

2 | P a g e

2. Go to the Design View and save the table as Tbl_Employees

3. Add the following field names and corresponding Data Types a. Employee ID – Auto Number

b. EmpName – Text c. EmpPassword – Text

i. Go to Input Mask – Select Yes to Save ii. Select Password – Finish

4. Go back to the Datasheet view and – Save.

5. Open the employees Table (Fill in entries) once done close table and Save. d. Jack Smith - 11111

e. Jane Doe - 22222 f. Mary Cline - 33333

(3)

3 | P a g e

II. Designing a Form

1. Go to Create tab and select Form Design from the Forms Group

(4)

4 | P a g e

3. In the Property sheet modify the Selection type Form from in the Format Tab as follows:

a. Allow Datasheet View – No b. Allow Pivot Table – No c. Allow Pivot Chart View – No d. Allow Layout View – No e. Record Selectors – No f. Navigation Buttons – No g. Dividing Lines – Yes h. Border Style – Dialog

(5)

5 | P a g e

4. Right Click on Form Grid and select Form Header / Footer

(6)

6 | P a g e

6. Right Click in the Form Header and select from Fill/Back Color choose a Light Gray and repeat the same steps for the Form Footer.

(7)

7 | P a g e

a. Type: Please Enter Password

b. Go to Format tab and change Font Color to Black c. Increase the Font Size to 20

d. Right Click on Text go to Size and Select To Fit (Adjust Accordingly to grid)

8. Go to Design Tab and double click Button from the Controls group.

(8)

8 | P a g e

b. Copy the Button and paste next to the first button created.

c. Double Click the first button and rename to &Login

i. Select Other tab in Property Sheet ii. Change Name to cmdLogin

(9)

9 | P a g e

d. Double Click the Second button and rename to Exit i. Select Other tab in Property Sheet

ii. Change Name to CmdExit

9. Go to the Design Tab, click on Combobox from the Controls Group then Drag and Drop into Detail Section

(10)

10 | P a g e

a. Select the First option in the Wizard (I want this com…) click Next

b. Make sure the Tables view option is selected and click Next

(11)

11 | P a g e

d. Select Employee Name as Ascending and click Next and Finish.

e. Click in the Unbound Section go to Other tab in Property Sheet and change name to CboEmployeeName

f. Select the left most box (EmpName) and change font color to Black and Resize Boxes Accordingly.

(12)

12 | P a g e

10. Go to the Design Tab, select Text Box from the Controls Group then drop and drag into Details section

a. Click in the left text box and type in Password

b. Click in the Unbound Section go to Other tab in Property Sheet and change name to TxtPassword.

c. Select the left most box (Password) and change font color to Black and Resize Boxes Accordingly.

(13)

13 | P a g e

d. Close the Form (Right Click and Rename to FrmLogin) OR =

=

11. Go to the Create Tab and Select Blank Form Design from the Forms group

a. Select Button from the Controls Group and drop into the center of the Form and Click Cancel on the Wizard Box

(14)

14 | P a g e

b. Increase the Size and Rename Command0 to Welcome and click on design grid.

=

c. Close form and rename as MainForm press Ok

III. Entering Codes

(15)

15 | P a g e

a. Right click on the Login button and select Build Event….

(16)

16 | P a g e

c. Select the Code from the Code Page and Copy the Codes from the Notepad File called VBfrmlogincode.txt and paste to replace previous code.

(17)

17 | P a g e

Paste Code here to replace then Save (Floppy) and Close (Red X)

(18)

18 | P a g e

e. Select Code Builder and OK it

(19)

19 | P a g e

(20)

20 | P a g e

VB CODE copy below and Paste. Option Compare Database

Private intLogonAttempts As Integer Private Sub cmdLogin_Click()

'Check to see if data is entered into the UserName combo box If IsNull(Me.cboEmployeeName) Or Me.cboEmployeeName = "" Then MsgBox "You must enter a User Name.", vbOKOnly, "Required Data" Me.cboEmployeeName.SetFocus

Exit Sub End If

'Check to see if data is entered into the password box If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then

MsgBox "You must enter a Password.", vbOKOnly, "Required Data" Me.txtPassword.SetFocus

Exit Sub End If

'Check value of password in tblEmployees to see if this matches value chosen in combo box If Me.txtPassword.Value = DLookup("EmpPassword", "tbl_Employees", "[Employee ID]=" & Me.cboEmployeeName.Value) Then

MyEmpID = Me.cboEmployeeName.Value 'Close logon form and open splash screen DoCmd.Close acForm, "frmLogin", acSaveNo DoCmd.OpenForm "MainForm"

Else

MsgBox "Password Invalid. Please Try Again", vbCritical + vbOKOnly, "Invalid Entry!" Me.txtPassword.SetFocus

(21)

21 | P a g e

End If

'If User Enters incorrect password 3 times database will shutdown intLogonAttempts = intLogonAttempts + 1

If intLogonAttempts > 3 Then

MsgBox "You do not have access to this database. Please contact your system administrator.", vbCritical, "Restricted Access!"

Application.Quit End If

End Sub

Private Sub FormFooter_Click() End Sub

References

Related documents

as the source data. On the External Data tab, in the Export group, click Mo then select Merge it with Microsoft Office Word. The. Microsoft Mail Merge Wizard opens. Select to create

In Table Design View, click the Data Type box of the field you want to use a list in, and select Lookup Wizard from the list.. On the lookup wizard, select “I will type in the

--Right-click the connection you want to protect --Click Properties and select the Advanced tab --Check the box under Internet Connection Firewall --Click OK. According to

• Step 1 - Go to 'Enquiries' tab • Step 2 - Click on [Credit Cards] • Step 3 - Select Credit Card product you want to view transaction details • Step 4 - Click [Detail]. •

If you want to submit a 5010 transaction click on the /././ Inbound option from the drop down menu and click the Go To button, or click on the Inbound folder hyperlink, or upload

1) Click the “Historical” tab on the Adaptive Management Console, then select “Call Recorder” from the drop-down menu. 2) Click the “Calls” tab to access the selection

Click the Days drop-down menu and click the 1 box to select the first day of the month, then click on the main Create Basic Task Wizard window to close the Days drop-down menu..

And select the advanced security option. Untick the Enable firewall and NAT services box.. Then go to the Status tab. Then click on Connection status.. Under the Wan section it