You are on page 1of 303

SELF CERTIFICATE

I certify that project titled PROPERTY MANAGEMENT SYSTEM has been carried out by me for the partial fulfillment of project of BCA VI Semester. We further certify that above project have not been submitted any where else for the award of any examination.

Name

Signature

CERTIFICATE FOR THE PROJECT


This is to certify that the project/dissertation titled PROPERTY MANAGEMENT SYSTEM bonafide record of the project work done satisfactorily by Archana Sengar for the partial fulfillment of BCA VI Semester examination & has been carried out under my direct supervision and guidance. This report or a similar report on the topic has not been submitted for any other examination and does not form part of any other course undergone by the candidate.

Signature of the Guide/Supervisor Name Place Designation Date Address : Alok Saran : Vidisha : Teacher and Guide : : Dot Com Computer Centre

Signature of the centre manager ______________

ACKNOWLEDGEMENT
Today when I have successfully completed the task of developing the software PROPERTY MANAGEMENT SYSTEM. I remember all those without whom this task would become very difficult. My sincere thanks goes to our Guide Alok saran sir, who generally shared his wisdom and expertise with me. His in depth knowledge in the similar field and intellectual suggestions were major pillars to the road of success.

ARCHANA SENGAR

1. Project Title : Property Management System 2. Software Base : Visual Basic Ms Access 3. Submitted for Course & Year : BCA VI Semester 2008. 4. Group Evaluation (Project Report & CD Evaluation Planning+20 Marks Development+20marks Execution) Examiner-1 Examiner-2 Group Evaluation(M.G.)

5. Individual Students Evaluation :


Registration Roll No. No. Name of Candidate Internal Marks(mi) given By Head of Study Centre External Marks(Me) Given by Examiner Total Mark (max 100) UNI MT= (MG+ME+MI)

6. Study Centre Code & Name : 7. Forwarding By head of study Centre : (Signature Name & Study centre Seal) 8. Remark :

1. Project Title : Property Management System 2. Software Base : Visual Basic Ms Access 3. Submitted for Course & Year : BCA VI Semester 2008. 4. Group Evaluation (Project Report & CD Evaluation Planning+20 Marks Development+20marks Execution) Examiner-1 Examiner-2 Group Evaluation(M.G.)

5. Individual Students Evaluation :


Registration Roll No. No. Name of Candidate Internal Marks(mi) given By Head of Study Centre External Marks(Me) Given by Examiner Total Mark (max 100) UNI MT= (MG+ME+MI)

6. Study Centre Code & Name : 7. Forwarding By head of study Centre : (Signature Name & Study centre Seal) 8. Remark :

Index
(1) (2) (3) (4) (5) (6) (7) Self certificate Sponsorship certificate Forwading Acknowledgement Abstract Preface Introduction about Visual Basic. Hardware / Software requirment Main Features of Visual Basic Creating a Visual Basic Application (8) Introduction about Ms Access. Creating a DataBase Microsoft Access Data Base Relationship is an access Data Base (9) System Analysis. Preliminary investigation Feasibility Study i. ii. iii. Technical Feasibility Economic Feasibility Operational Feasibility

Request Approval

(10) Software Engineering Paradigam.


(11)

Software Requirments Specifications. System We Worked. Testing Data Flow Diagram

(12) System Design.


(13)

(14) Manual (15) Testing (16) Project Outline (17) Form (18) Coding (19) Project Importents(Objectives) (20) Project Advantages (21) Hardware/Software Specification (22) Conclusion Implementation

System Description Maintenance

Evaluation Maintenance Security Measures Taken Cost Estimation of the Project Future Scope of the Project Conclusions

Abstract The quick accurate collection processing and retrieval Property Management date is or immense importents. In a internet system as on the current date Property Management marks a correctly cost, time duration and firstly decided to the our customer or not. Keeping this in mind college name is has been computerized we have been assigned the project of Property Management . The Project is an endeavor to improve efficiency in the process of registration time duration. How schema the allot and how much the time direction. The above mentioned process till date is totally manual leaching to transaction processing system has resulted in reasonable solution to current problem. The after I Modified versions Modules, considering. The various validation checks and security measures. Which are prerequisite of on-line system. It is apparent the besides in traducing efficient customer management, improved accuracy access to customer status etc. the new system relieve the

concerned dept. of the redundant workload.

kk

PREFACE The software development is this biggest challenge in information technology. Fifteen years have elapsed since the development in IT sector for software development. The enterie scenerio has been changed after this growth, now peoples & organization are more likely to be depend on softwares like Property Management, Financial Accounting, Sales order, Hospital etc. Each software has its own strenth and points of emphasis, depending on the analysis of the systems have emphasized the computational and model based assumption in softwares. This emphasized arses from the experience obtained in software development unit with higher end professionals in IT sector.

The level of presentation for the best of end user in the organization. However it is an attempt to provide the best in the industry. ARCHANA SENGAR

INTRODUCTION ABOUT VISUAL BASIC :Sounds like a simple question in mind. Figuring out now Microsoft visual basic, the fastest and easiest way to create application for Microsoft windows. Whether you are an experienced professional or brand new to windows programming, visual basic provides you with a complete set of tools to simplify rapid application development. So what is visual basic? The Visual part refers to the method used to create the graphical user Interface (GUI). Rather than writing numerous lines of code to describe the appearance and location of interface elements, you simply add rebuilt object s into place on screen. If youve ever used a drawing program such as paint, you already have most of the skills necessary to create an effective user interface. The Basic part refers to the BASIC (Beginners All-Purpose Symbolic Instruction Code) language, a language used by more programmers than any other language in the history of computing. Visual basic has evolved from the original BASIC language and noel contains several hundred statements, function, and keywords, many of which relate directly to the windows GUI. Beginners can create useful applications by learning just a few of the keywords, yet the power of the

language allows professionals to accomplish anything that can be accomplished using any other Windows programming language. The Visual Basic programming language is not unique to visual basic. The visual basic programming system, applications edition included in Microsoft Excel, Microsoft Access, and many other Windows applications uses the same language. The Visual Basic scripting edition (VB Script) is a widely used scripting language and a subset of the Visual Basic language. The investment you make in learning Visual Basic will carry over to these other areas. Whether your goal is to create a small utility for yourself or your work group, a large enterprise-wide system, or even distributed applications spanning the globe via the internet, Visual Basic has the tools you need. Active X tm technologies allow you to use the functional it provided by other applications, such as Microsoft Word, word processor, Microsoft Excel spreadsheet, and other Windows applications. You can even automate applications and objects created using the professional or enterprise editions of Visual Basic. Internet capabilities make it easy to provide access to documents and applications cross the internet or intranet from within your application, or to create internet server applications. Your finished applications are a true .exe file that uses a Visual Basic virtual machine that you can freely distribute. Visual Basic Editions Visual Basic is available in three versions, each geared to meet a specific set of development requirements. The Visual Basic learning edition allows programmers to easily create powerful applications for Microsoft Windows and

Windows NT. It includes all intrinsic controls, plus grid, tab, and data-bound controls. Documentation provided with this edition includes the learn VB Now CD plus Microsoft developer network (MSDN tm) library CDs containing full online documentation. The professional edition provides computer professionals with a full-featured set of tools for developing solutions for others. It includes all the features of the learning edition, plus additional ActiveX controls, the internet information server application designer, integrated Visual database tools and data environment, active data objects, and the dynamic HTML page designer. Documentation provided with the professional edition includes the Visual Studio professional features Book plus Microsoft developer network CDs containing full online documentation.

TYPES OF INTERNSIC CONTROL


Static Text Group Box Check Box Scroll Bar Timer Folder Hierarchy Circles abed Stuff Pictures Editable Text

Button Radio Button Drop Down List List

Integrated Development Environment Elements :The Visual Basic integrated development environment (IDE) consists of the following elements.

Menu Bar
Display the commands you use to work with Visual Basic. Besides the standard File, Edit, View, Windows, and Help menus, menus are provided to access functions specific to programming such as Project, Format, or Debug.

Context Menus
Contain shortcuts to frequently actions. To open a context menu, click the right mouse button on the objects youre using. The specific list of shortcuts available from context menus depends on the part of the environment where you click the right mouse button. For example, the context menu displayed When you right click on the Toolbox lets you display the components dialog box, hide the Toolbox, dock or undock the Toolbox, or add a custom tab on the Toolbox.

Toolbars
Provide quick access to commonly used commands in the programming environment. You click a button on the Toolbar once to carry out the action represented by that button. By default, the

standard Toolbar is displayed when you start Visual Basic. Additional Toolbars for editing, from design, and debugging can be toggled on or off from the Toolbars command on the View menu. Toolbars can be docked beneath the menu bar or float if you select the vertical bar on the left edge and drag it away from the menu bar.

Toolbox
Provides a set of tools that you use at design time to place controls on a from. In addition to the default toolbox layout, you can create your own Custom layouts by selecting add tab from the context menu and adding controls to the resulting tab. Project Explorer Window Lists the forms and modules in your current project, a project is the collection of files you to build an application.

Properties Window
Lists the property settings for the selected form or control. A property is a characteristic of an object, such as size, caption, or color.

Form Designer
Serves as a window that you customize to design the interface of your application. You add controls, graphics, and pictures to a form to create the look you want. Each form in your application has its own form designer window.

Object Browser
Lists objects available for use in your project and gives you a quick way to navigate through your code.

Code Editor Window

Server as an editor for entering application code. A separate code editor window is created for each form or code module in your application.

Form Layout Window


The form layout window allows you to position the forms in your application using a small graphical representation of the screen.

Immediate, Locals, and Watch Windows


These additional windows are provided for use in debugging your application. They are only available when you running your application within the IDE.

DATABASE PROGRAMMING IN VISUAL BASIC

DAO :Data Access Objects (DAO) can be used either with the Microsoft jet database engine or, using the ODBC direct option, without it. This chapter discusses design and implementation issues that arise when using the Data Access Objects (DAO) to access remote databases. The Microsoft jet database engine is a stand-alone database management system that is capable of both processing queries and routing queries to remote servers as needed. Accessing jet through DAO adds to Microsoft Visual Basics ease of development by providing an object-oriented development paradigm and accessibility to data-aware bound controls.

Remote Data Access Using DAO and ODBC Direct

Visual Basic version offers an additional option that can be used with DAO to access remote database engines. ODBC Direct .this DAO option permits your application to choose the database engine and interface used by DAO. Basically, you have to choices: The Microsoft jet database engine .By default, DAO used jet toper form all data access operations. ODBC direct. When this option is enabled, DAO loads the Remote Data Object (ROD) 2.0 libraries and delegates all data access operation to the ODBC data source. Basically, ODBC Direct maps each of the data access object to an equivalent remote data object .while not all the RDO functionality is implemented with ODBC direct , this approach permits you to leverage existing DAO-based applications using a familiar object model when accessing remote database system.

Creating Data Sources


A data source is an object that binds other object to data fro man external source. The foundation for a data source object is a data aware class module, which is essentially a class module that exposes interfaces to an external source of data. Data aware classes can also be used as the basis for ActiveX components. One common example of a data aware component is the ADO data control, which provides visual interfaces for

binding control to a data through ADO. Although you could create a data aware class that dose same thing as the ADO data control, sharing that class between multiple application and multiple programmers could prove difficult. A much better approach would be to create an active X component that duplicates or expands on the functionality of the ADO data control .As any Active X component; this could take any one of the several forms: an ActiveX control, an ActiveX DLL, or An active X EXE. In any case, your Active X data source can be easily shared, simplify access to the data regardless of where that data resides: in a local database like Access in a remote database such as SQL, or even in a private OLE DB data store. The series of step by-step procedures in the chapter will demonstrative two different approaches to aerating data source components. First well build an ActiveX data. Source control my data control, which emulates the ADO data control. Next well bind the data control to other control using both simple and complex binding. Finally, well create an ActiveX DLL, My Data that demonstrates binding to a private data store in an OLE DB simple provider.

The procedures for creating the data source components build on each other. The sequence in which you perform the procedures is therefore important.

Introduction about Ms Access


Microsoft Access is a relational database management system (DBMS). At the most basic level, a DBMS is a program that facilitates the storage the retrieval of structure information on a computers hard drive. Example of wellknow industrial-strength relational DBMS include Ms-Access. A full-feature procedural programming language, essentially a subset of visual basic. A simplified procedural macro language unique to Access. A rapid application development environment computer with visual form and report development tools. A sprinkling of objected-oriented extension. Various wizards and builder to make development easier. For new user, these multiple personalities can be a source of enormous frustration. The problem is that each personality is based on a different set of assumption and a different view of computing for instance. The relational database personality expects you to view your application as sets of data. Microsoft SQL server. IBM DB2. Informix.

Well-know PC-based (desktop) relational DBMS include Microsoft Access. Microsoft Fox-pro. Borland DBase. The many faces of Access Microsoft generally like to incorporate as many features as possible into its product .For example, the Access package contains the following elements:

A relational database system that supports two industry standard query language: Structure Query language (SQL) and Query by Example (QBE);

What is Access?
The procedural programming personality expects you to view your application as commands to be executed sequentially. The object oriented personality expects you to view your application as objects which encapsulate state and behavior information. Microsoft makes no effort to provide an overall logical integration of these personalities (indeed, it is unlikely that such integration is possible).Instead, it is up to you as a developer to pick and choose the best approach to implementing your application. Since there are often several vastly different ways to implement a particular feature in access, recognizing the different personalities and exploiting the best features (and avoiding the pitfalls) of each are important skills for Access developer. The advantage of these multiple personalities is that it is possible to use Access to learn about an enormous range of information. System concepts without introduction to Microsoft Access having to Interact with a large number of single-personality tools. for example: Ms-Access for relational database. Power Builder for rapid application, Smalltalk for objects-oriented programming.

Keep this advantage in mind as we switch back and forth between personalities and different computing paradigms. Access database

Although the term database typically refers to a collection of related data table, an Access database includes more than just data. In addition to table, an Access database file contains several different types of database objects. Saved queries for organizing data, Forms for interacting with data on screen, Reports for printing results,

Macros and visual basics programs for extending the functionality of database application. These entire database objects are stored in a single file named <filename>. MDB. When you are running Access, temporary locking file named<filename>.LAB is also created you can safely ignore the*.LAB file; everything of value is in the *.mdb file. Microsoft Access documents are called database. An Access database is a collection of database, object, table, queries, forms, reports, macros, and modules. You can design new object or open existing ones to work with your database unlike many database programs an Access database can contain all of the objects that make up a database application in a single file with the .mdb file name extension. For this reason, an Access database file is sometimes called a database. You can store general-purpose Microsoft Visual Basic for application procedures in a library database. An Access database application can call procedures from a library database. After establishing a link to the database. Called a reference. You can create or purchase tools called add-ins to add custom feature to Access. Access user-level security account information is stored in a database. Called a workgroup information file.

TABLES:In Microsoft Access, you store data in table. Table organizes data into columns and rows. Each row in a table is called a record. Each column in a record is called a field. For example, each record in a Customer table contains information about one customer. Each customers record contain fields name for each piece of information you want to store about the customer, such as last name, first name, address, city, state/province, postal code and phone. Users can enter and modify data in table directly or through queries and data entry forms, Witch is described later in this section.

Storing related data in separate tables :You can create a separate table for each topic of data. Such as customers, employees, or products. Using a separator table for each topic means that you store that data only once, which makes your database .more efficient and reduces data entry errors. For example If you, if you store both customer and order information in one table, whenever a customer places an additional order, you have to reenter information about that customer. Not only is this inefficient, but errors can occur when information is reentered. If you keep separate table for customer and orders, each customer has only one record in the Customer table. If you need to update or correct information about a customer, you need to change data in only one record. This method eliminates redundant entries and reduces datacenter errors. The process of eliminating redundancy by dividing data into separate related table is called normalization. Access providers a wizard called the Table analyzer Wizard to help you normalize your database.

Defining Relationships
To bring the data from multiple tables together for a query, form or report, you define relationship between the tables based on a common piece of information stored in both tables. For example a Customer table typically contains a Customer ID field whose value uniquely identifies each customer. If the order table also has a Customer_ID field, you can define a relationship between the two tables, so that when you enter orders, you can enter a customers ID number to relate information from the Customer table to that order. Instead of actually typing the Customer_ID.you can use a lookup list box, as shown in the orders form the north wind sample database.

Analysis is the detailed study of the various operations performed by the system and their relationship within or outside the system. One aspect of analyzing the system is defining the boundaries of the system and determining whether or not a candidate. System should consider other related system. During analysis, data are collection on all available files. Decision points, and transactions handled by the present system. Ones analysis is completed, the analyst has firm understanding of what is done. Preliminary Investigation This phase is one in which a request is made by business system to receive the assistance from system developers. The request may be made for various reasons. The persons initiating the request might be: A manager The proprietor An employee A system specialist

This phase is broken into parts: 1. Request Clarification Whenever a representative of a business system make request for a change, that request might not have been clearly communicated, therefore befor any system investigation can commence, the project request must be examined to clearly understand what the business system requires, In this phase the project request has to be verified for its ingenuity to understand what the user wants.

2. Feasibility Study an important outcome of the first phase is the determination of the project requests feasibility. There are three aspects of feasibility: Technical Feasibility Determines whether the work for the project can be done with the existing equipment, software technology and available personnel.

Economic Feasibility

Determine whether there are sufficient benefits in creating the system to make cost acceptable, or the cost of the system is too high. Operational feasibility Finds out whether the system if developed will be used or will there be any strong resistance from any component of the system. 3. Request Approval The last part is request approval. Not all requested projects are both desirable and feasible. Many projects requests are received from employees only a few of whom can be perused. However, those projects that are both feasible and desirable and desirable should be put into use so approval of the users has to be got in order to start on other issues, such as cost, priority, completion time and personal requirement.

Software Engineering Paradigm This is the backbone of the system as in this phase a detailed study is done in understanding all the impotent of the business area under investigation. This is referred as detailed investigation. In this phase the active participants are the system analysis and the people concerned with the system under study. The interaction has to be complete in order to get the following questions vital for the study:1. 2. 3. 4. what procedure is currently in practice? How is the procedure executed How frequently it is practiced what is the volume of transactions or decisions? 5. is there any problem in the procedure? 6. what is the cause of hitch? To get the answer to the questions, System Analyst talk to a variety of people and get there opinion on what things are happing and why things are happening in order to arrive at the conclusion on what has to be done for the better. System Analyst also study the requirements to identify the features of the new system that should have: 1. Processing Controls 2. Response Time 3. Input & Output Method Etc.

SYSTEM CONFIDENTIALLY It is a special status given to sensitive information in a database to minimize the possible invasion of privacy. It is an attribute of information that characterizes its need for protection. System security is the technical means of providing such protection. In contrast, privacy is largely a procedural matter of how information is used.

Data privacy & security are issues that fo beyond the scope of system development. They are actually a societal problem. An organization that depends heavilt on the use of database requires special controls to maintain

SOFTWARE DEVELOPMANT LIFE CYCLE


System Development Model
Software development has hit something of a crisis we fail to deliver software that meets user expectation. However by employing disciplined techniques throughout the development of software and by employing a philosophy of co-ordination control and management through out the development lifecycle of software project standard may be achieved. The aim is to provide discipline to the development of software a structured framework against which development takes place is advocated. A model of the process of system development is used by organization to describe their approach to producing computer system. Traditionally this has been a staged (or phased) approach; know as the system life cycle or system development life cycle (SDLC).

Purpose for SDLC


This SDLC methodology establishes procedures, practices, and guidelines governing the initiation, concept development, planning requirements analysis, design, development , integration and text, implementation, and operations, maintenance and disposition of information system .it should be used in conjunction with existing policy and guidelines for acquisition and procurement ,as these areas are not discussed in the SDLC.

Scope
This methodology should be used for all DOJ information system and applications .it is applicable across all information technology (IT) environments (e.g. mainframe, client and server) and applies to contractually developed as well as in-house development

application. These specific participants in the life cycle process. And the necessary and approvals vary from project to project. The guidance provided in this document should be tailored to the individual project based on cost, complexity and criticality to the agencys mission.

Applicability
This methodology must be applied to those who are responsible for information system development. All project managers and development teams involved in system development project represent the primary audience for the SDLC.

INTRODUCTION TO SDLC
The SDLC includes ten phases during which defined IR work products are created or modified. The tenth phase occurs when the system is disposed of and the task performed is eliminated or transferred to other system. The tasks and work products. For each phase are described in subsequent chapter. Not every project required that the phase be sequentially executed. However the phased are interdependent. Depending upon the size and complexity of the project, phase may be combined or may overlap.

PHASE OF SDLC Initiation phases


The initiation of a system (or project) begins when a business need or opportunity is identified. A project manager should be appointed to manage the project. This business need is documented in a concept proposal. After the concept proposal is approved, the system concept development phase begins.

System concept Development phase


One a business need is approved, the approaches for accomplishing the concept is reviewed for feasibility and approp4iatenss. The system boundary document identifies the scope of the system and requires senior official approval and funding before beginning the planning phase.

Planning phase
The concept further developed to describe how the business will operate once the approved system is implemented, and to assess how to system will impact employee and customer privacy. To ensure the products and /or services provide the required capability on-time and within budget, project resources. Activities, schedules tools and reviews are defined. Additionally, security certification and accreditation activities begin with the identification of system security requirements and completion of high level vulnerability assessment.

Requirements Analysis phase


Functional user requirements are formally defined and delineate the requirement in terms of data, system performance, security, and maintainability requirement for the system. All requirements are defined to a level of detail sufficient for system design to proceed. All requirement need to be measurable and testable and relate to the business need or opportunity identified in the initiations phase.

Design phase
The physical characteristic of the system are designed during this phase. The operating environment is established, major subsystems and input and the output are defined, and processes are allocated to resources. Every thing requiring user input or approval must be documented and reviewed by the user. The physical characteristics of the system are specified and detailed design is prepared. Subsystem identified during design is used to create a detailed structure of the system. Each subsystem is partitioned into one or more design units or modules. Detailed logic specifications are prepared for each software module.

Development phase
The detailed specification produced during the design phase is translated hardware, communication, and executable software shall be unit tested, integration, and rested in a systematic manner. Hardware is assembled and tasted.

Integration and test phase


The various computer of the system are integrated and systematically tested. The user tested the system to ensure that the functional requirement, as defined in the functional requirement document, is satisfied by the developed or modified system. Prior to installing and operating the system in a production environment, the system must be undergoing certification and accreditation activity.

Implementation phase
The system or system modification are installed and made operational in a production environment. The phase is initiated after the system has been tested and accepted by the user. This phase continue until the system is operating in production in accordance with the defined user requirements.

Operations and Maintenance Phase


The system operation is ongoing. The system is monitored for continued performance in accordance with requirement, and needed system modification is incorporated. The operational system is periodically assessed through in-process reviews to determine how the system can be made more efficient and efficient. Operations continue as long as the system can be effectively adapted to respond to an organization needs. When modifications or change are identified as necessary, the system may reenter the planning phase.

Disposition Phase
The disposition activities ensure the orderly termination of the system and preserve the vital information about the system so that some or all of the information may be reactivated in the future if necessary. Particular emphasis is given to proper preservation of the data processed by the system,

So that the data is effectively migrated to another system or archived in accordance with applicable records management regulations and policies, for potential future access

Classical Waterfall
The lifecycle approach is derived the waterfall model of the system development described by Royce in 1970, a simplified version of which is given below.
Requirements Analysis

Functional Specification

Design

Implementation (Coding)

Testing

Classic system Development Life Cycle-version 1

There are now many variations on the theme of the waterfall model, Alternatives
Feasibility Analysis Design Implement Test Maintain

Feasibility Study:
Is the project technically, operationally, financially and legally feasible? The feasibility is used to determine if the project should get the go-ahead. If the project is preceding the feasibility study will produce a project plane and budget estimates for the future stage of development.

Analysis:
Gather the requirements for the system. This stage includes details a detailed study of the business needs of the organization. Option for changing the business process may be considered.

Design:
This focuses on high level design (What programs are we going to need how are they going to interact), low level design (how the individual programs are going to work), interface design (what are the interfaces going to look like) and data design (what data are going to need).

Implementation:

The design is translated into code. Computer programs may be written using a conventional programming language to a fourth generation language (4GL) or an application generator.

Test:
The system is tested. Normally programs are written are as a series of individual modules-these should be subject to separate and detailed test. The system is then tested a whole- the separate modules are brought together and tested as complete system. the system need to be ensure that interfaces between modules work(integration testing), the system work on the intended platform and with the expected volume of data (volume testing) and the system does what the user requires(acceptance/beta testing).

Maintenance:
Inevitably the system will need maintenance-hopefully we havent got anything wrong but people will want extra things added or existing things changed over time. This paradigm is the oldest and the most widely used approach to system development, it was developed by Royce in 1970. Waterfall Approach Characteristics although there are many variations on the theme of the lifecycle, each approach has its own characteristics: 1. Specific activities , techniques and outcomes are associated with each stage; 2. progression between stages is orderly and proceeds in a liner fashion; 3. viewed to be a process driven by technicians; 4. monitoring and control takes place at the end of stage; 5. Involvement of end users is typically passive and principally in the analysis stage. The lifecycle model assumes that system will be constructed from scratch by a team of IS professionals either in-house of within a software house.

Other approaches exist, namely: 1. Those based on alternative lifecycle e.g. prototyping , evolution ary development, spiral model; 2. Those which have a different philosophical basis e.g. soft sys tem and sociotechnical approaches; 3. The use of package software to address application areas; 4. The development of application by end users. A number of these alternative approaches will be examined later in the course. However, our initial focus will be on the on the waterfall model of the system development. Problem with the waterfall approach 1. Real projects rarely follow the sequential process illustrated- interaction though the cycle is required. 2. It is often difficult for the customer to state all requirements explicitly at the state of the development lifecycle (the reasons for problems when capturing requirements has/will be covered). With this approach, the customer must be patient- a working version is not usually available until late in the development lifecycle.

DATA FLOW DIAGRAM


Consumer Property Management Dealer Finance Area

Context Level Data Flow Diagram

Consumer

Dealer

Reception

Payment

Area

Saler

Room

Financer

DETAILED LEVEL DATA FLOW DIAGRAM

OWNER COMPANY CONTRACT:-

PROJECT OUTLINE
A.TITLE OF THE PROJECT:- PROPERTY MANAGEMENT
SYSTEM

B.OBJECTIVE OF THE PROJECT:This project has been designed for the Property. This simple to use and to manage. All the basic requirements of a Property have been fulfilled successfully. C. LEAST HARDWARE SPECIFICATION:System Ram CD Drive Key Board Monitor Operating System : P-IV : 128 MB : Any One : Any (101,104,106) : 14/15 Color Monitor : Windows (XP)

D.SOFTWARES USED:DEVELOPMENT TOOLS DATABASE : VISUAL BASIC 6.0 : MS-ACCESS

E. ABOUT THE PROJECT :-

This project provides the facility for property management . User can store the information about properties and payment. Its also provides the facility for maintain information about saler and dealer. The software uses Ms-Access 8.1.5.0.0 (Enterprise Edition) as the back end and Visual Basic as the front end. The choice of the software was definitely driven by current demand of the software in todays market. Visual Basic was instead of Developer 2000 because Visual Basic is not only a front end but also a software development environment or tool So by as front end tool we got a chance to study its various other aspect.

CONCLUSION This is a project for Property Management it is a dummy project because due to the deficiency of actual information about Regulation. Our Project can be extended we are unable to work more on this now because of lack of time. We will work more on it after some time we can make it useful for many other Regulation. We can add some sorting method in it. We also add some other facilities which help in it. We also can add some other facilities which help in formatting students enquiry. We can extend it for making records of marks etc. If we done this work also in our project we can sell it in market even as a self package. We are actually by to model it in the real world problem some of the aspects we fulfill but some can also be untroubled such as we dont Know the.. 7. Actual Fare Work to Property Management 8. Actual Rate and Facilities. 9. We are unable to model the actual Property Management due to the tack/skills, Information and support.

BIBLIOGRAPHY
Below are the references used in designing the project: 1.DAEABASE CONCEPT BY HENRY KORTH & ABHRAHAM SIBERSCHATZ 2.MASTRING VISUAL BASIC BY EVANGELOUS PETREOUS

PROJECT ADVANTAGES
1.DATA REDANDANCY ARE BE REDUCED. 2.THE WORK IS FASTLY. 3.CHECK THE AMOUNT AND CUSTOMER 4.TIME DURATION FACILITY. 5.FLEXIBILITY 6.DATA SQURITY

Private Sub CancelButton_Click() Unload Me End Sub Private Sub Form_Load() If cn.State = 1 Then cn.Close End If conn If rs.State = 1 Then rs.Close End If If rs1.State = 1 Then rs1.Close End If If trank = "R" Then txt_type = "Rent" End If If trank = "M" Then txt_type = "Maintainence" End If If trank = "S" Then txt_type = "Sold" End If todate.Text = Format(Date, "dd/mm/yyyy") fromdate.Text = Format(Date, "dd/mm/yyyy") Customername.Text = TenantName lblpropcode.Text = propcode rs.Source = "select * from company_info" rs.Open companyname.Text = rs(0) rs.Close End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set rs1 = Nothing Set rs2 = Nothing Set cn = Nothing End Sub Private Sub OKButton_Click() 'to pass an entry to the transaction master rs1.Source = "select * from T_Property_Transaction_Ms" rs1.Open rs1.AddNew

rs1(0) = lblpropcode.Text rs1(1) = todate.Text rs1(2) = "Property is rented for further" & " " & Lst_ContactPeriod.Text & " " & "months" rs1(3) = todate.Text rs1(4) = lbltill.Text rs1(5) = Customername.Text rs1(6) = "On Rent" rs1.Update rs1.Close rs1.Source = "select * from property contract" rs1.Open rs1.AddNew rs1(0) = propcode rs1(1) = Format(Date, "dd/mm/yyyy") rs1(2) = Lst_ContactPeriod.Text rs1(3) = Format(Date, "dd/mm/yyyy") rs1(4) = lbltill.Text rs1(5) = "Active" rs1.Update rs1.Close MsgBox "Contract Successfully Executed", vbInformation, "Property Management"

OKButton.Enabled = False 'CancelButton.Caption = "Close" Unload Me End Sub Private Sub OKButton_GotFocus() 'sd = prd.Text 'top1 = sd * 28 'top2 = CDate(Format((fdt.Text), "dd/mm/yyyy")) + top1 'tdt.Text = Format(top2, "dd/mm/yyyy") End Sub Private Sub prd_Change() Customer(13).Caption = "This contract is from" sd = prd.Text top1 = sd * 28 top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1 lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub Private Sub prd_Click() Customer(13).Caption = "This contract is from"

sd = prd.Text top1 = sd * 28 top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1 lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub Private Sub prd_LostFocus() 'Customer(13).Caption = "This contract is from" 'sd = prd.Text 'top1 = sd * 28 'top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1 'lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub

Private Sub Command1_Click() If cmb_billno.Text = "" Then MsgBox "Please Select The Bill No First", vbInformation, "Property Management" cmb_billno.SetFocus Exit Sub Else DataEnvironment1.Connection1.Open DataEnvironment1.Command1_Grouping cmb_billno DataReport_BillInformation.Show 1 If DataEnvironment1.Connection1.State = 1 Then DataEnvironment1.Connection1.Close End If End If End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Form_Load() conn rs1.Source = "select bill_no from maint_bill_detail group by bill_no" rs1.Open If rs1.EOF = True Then MsgBox "No Bill No Yet Created", vbInformation, "Property Management" Else rs1.MoveFirst While rs1.EOF = False cmb_billno.AddItem (rs1.Fields(0)) rs1.MoveNext Wend End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs1 = Nothing Set cn = Nothing End Sub

Private Sub Command1_Click() If Cmb_complaints.Text = "" Then MsgBox "Please Select The Type of Complaint", vbInformation, "Property Management" Cmb_complaints.SetFocus Exit Sub Else DataEnvironment1.Connection1.Open If Cmb_complaints.Text = "Rent" Then DataEnvironment1.Command6_Grouping "A", DTPicker1.Value, DTPicker2.Value DataReportTenantAttendedComplaint.Show 1 Else DataEnvironment1.Command7_Grouping "A", DTPicker1.Value, DTPicker2.Value DataReportComplaintReportMaintainence.Show 1 End If If DataEnvironment1.Connection1.State = 1 Then DataEnvironment1.Connection1.Close End If End If End Sub Private Sub Command3_Click() Unload Me End Sub

Dim TenantCode As String Dim j As Integer Dim Complaintno As String Private Sub chb_repairing_Click() txt_ProblemAttendby.SetFocus End Sub Private Sub chb_repairing_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txt_ProblemAttendby.SetFocus End If End Sub Private Sub chb_replaced_Click() chb_repairing.SetFocus End Sub Private Sub chb_replaced_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then chb_repairing.SetFocus End If End Sub Private Sub cmd_create_Click() j=1 Frm_createbill.Height = 8500 cmd_create.Enabled = False If rs1.State = 1 Then rs1.Close End If rs1.Source = "select bill_no from maint_bill_detail group by bill_no" rs1.Open If rs1.EOF = True Then txt_bilno = "BIL1" Else txt_bilno = "BIL" & rs1.RecordCount + 1 End If txt_sn = j txt_description.SetFocus End Sub Private Sub Cmd_Exit_Click() Unload Me End Sub

Private Sub cmd_next_Click() cmd_save.Enabled = False If txt_complaintno = "" Then MsgBox "Please Select the Complaint Number", vbInformation, "Property Management" MSFlexGrid_CreateBill.SetFocus Exit Sub Else If IsDate(msk_dateattended.Text) = False Then MsgBox "Please Enter the Valid Date", vbInformation, "Property Management" msk_dateattended.SetFocus Exit Sub Else If msk_timeattended = "" Then MsgBox "Please Enter the Required Time", vbInformation, "Property Management" msk_timeattended.SetFocus Exit Sub Else If chb_repairing.Value = False And chb_replaced.Value = False Then MsgBox "Please Check Whether the Item is Replaced Or Repaired", vbInformation, "Property Management" chb_replaced.SetFocus Exit Sub Else If txt_ProblemAttendby = "" Then MsgBox "Please Enter the Required Name of Person", vbInformation, "Property Management" txt_ProblemAttendby.SetFocus Exit Sub Else If txt_description = "" Then MsgBox "Please Enter the Description of Item", vbInformation, "Property Management" txt_description.SetFocus Exit Sub Else If txt_quantity = "" Then MsgBox "Please Enter the Number of Quantitiy", vbInformation, "Property Management" txt_quantity.SetFocus Exit Sub Else If txt_rate = "" Then MsgBox "Please Enter the Rate of Item", vbInformation, "Property Management" txt_rate.SetFocus Exit Sub End If End If

End If End If End If End If End If End If txt_amount = txt_quantity * txt_rate j=j+1 txt_sn = j cmd_save.Enabled = True savedata Adodc1.Refresh txt_description = "" txt_quantity = "" txt_rate = "" txt_amount = "" txt_description.SetFocus End Sub Private Sub Cmd_Print_Click() DataEnvironment1.Connection1.Open DataEnvironment1.Command1_Grouping txt_bilno DataReport_BillInformation.Show 1 If DataEnvironment1.Connection1.State = 1 Then DataEnvironment1.Connection1.Close End If End Sub Private Sub cmd_save_Click() If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from Complaint_master where complaint_no='" & Complaintno & "'" rs1.Open rs1.Fields(10) = "A" rs1.Update i = MsgBox("Your Data is Successfully Saved,Would You Like to Print", vbInformation + vbYesNo) If i = vbYes Then cmd_next.Enabled = False cmd_save.Enabled = False cmd_print.Enabled = True Exit Sub End If

If i = vbNo Then Unload Me End If End Sub Private Sub Form_Load() conn MSFlexGrid_CreateBill.FormatString = "|Comp No.| Tenant/Owner Code | Date | Time | Nature |Description | Address " 'flex_bill.FormatString = " S/N |Description |Quantity |Rate |Amount " Dim i As Integer If rs1.State = 1 Then rs1.Close End If rs1.Source = "SELECT Complaint_Master.cdate, Complaint_Master.comp_nature, Complaint_Master.Complaint_no, Complaint_Master.ctime, Complaint_Master.description, Complaint_Master.tenant_Owner_code, Property_Address.Address From Complaint_Master, Property_Address Where Complaint_Master.property_ref = Property_Address.property_code and complaint_master.status='N'" rs1.Open i=1 If rs1.EOF = True Then Else rs1.MoveFirst While rs1.EOF = False MSFlexGrid_CreateBill.Rows = MSFlexGrid_CreateBill.Rows + 1 MSFlexGrid_CreateBill.TextMatrix(i, 1) = rs1.Fields(2) MSFlexGrid_CreateBill.TextMatrix(i, 2) = rs1.Fields(5) MSFlexGrid_CreateBill.TextMatrix(i, 3) = rs1.Fields(0) MSFlexGrid_CreateBill.TextMatrix(i, 4) = rs1.Fields(3) MSFlexGrid_CreateBill.TextMatrix(i, 5) = rs1.Fields(1) MSFlexGrid_CreateBill.TextMatrix(i, 6) = rs1.Fields(4) MSFlexGrid_CreateBill.TextMatrix(i, 7) = rs1.Fields(6) rs1.MoveNext MSFlexGrid_CreateBill.ColAlignment(4) = vbAlignLeft MSFlexGrid_CreateBill.ColAlignment(3) = vbAlignLeft i=i+1 Wend End If msk_billdate.Text = Date

End Sub Private Sub Form_Resize() Frm_createbill.Top = (Screen.Height - Frm_createbill.Height) / 2 Frm_createbill.Left = (Screen.Width - Frm_createbill.Width) / 2 End Sub Private Sub Form_Unload(Cancel As Integer) cn.Execute "delete from temp_main_bill_detail" Set rs1 = Nothing Set rs2 = Nothing Set rs3 = Nothing Set rs4 = Nothing Set cn = Nothing End Sub Private Sub MSFlexGrid_CreateBill_DblClick() txt_complaintno = MSFlexGrid_CreateBill.TextMatrix(MSFlexGrid_CreateBill.RowSel, 1) msk_dateattended.SetFocus txt_complaintno1 = MSFlexGrid_CreateBill.TextMatrix(MSFlexGrid_CreateBill.RowSel, 1) cmd_create.Enabled = True Complaintno = MSFlexGrid_CreateBill.TextMatrix(MSFlexGrid_CreateBill.RowSel, 1) TenantCode = MSFlexGrid_CreateBill.TextMatrix(MSFlexGrid_CreateBill.RowSel, 2) If rs1.State = 1 Then rs1.Close End If If Mid(MSFlexGrid_CreateBill.TextMatrix(MSFlexGrid_CreateBill.RowSel, 2), 1, 1) = "P" Then rs1.Source = "SELECT Property_Master.property_no From Complaint_Master, Property_Master Where Complaint_Master.tenant_Owner_code = Property_Master.owner_code AND Complaint_Master.tenant_Owner_code = '" & MSFlexGrid_CreateBill.TextMatrix(MSFlexGrid_CreateBill.RowSel, 2) & "'" rs1.Open txt_ownerreference = rs1.Fields(0) Else rs1.Source = "SELECT Tenant_Master.property_code From Complaint_Master, Tenant_Master Where Complaint_Master.tenant_Owner_code = Tenant_Master.Tenant_code AND complaint_master.complaint_no = '" & MSFlexGrid_CreateBill.TextMatrix(MSFlexGrid_CreateBill.RowSel, 1) & "'" rs1.Open txt_ownerreference = rs1.Fields(0) End If End Sub

Private Sub msk_dateattended_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then msk_timeattended.SetFocus End If End Sub Private Sub msk_timeattended_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then chb_repairing.SetFocus End If End Sub Private Sub Txt_description_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_quantity.SetFocus End If End Sub Private Sub txt_ProblemAttendby_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_Remarks.SetFocus End If End Sub Private Sub savedata() If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from comp_attendent_detail" rs1.Open rs1.AddNew rs1.Fields(0) = Trim(txt_complaintno) rs1.Fields(1) = msk_dateattended.Text rs1.Fields(2) = msk_timeattended.Text If chb_repairing.Value = 1 Then rs1.Fields(3) = "Repairing" End If If chb_replaced.Value = 1 Then rs1.Fields(3) = "Replaced" End If If chb_repairing.Value = 1 And chb_replaced.Value = 1 Then rs1.Fields(3) = "Both" End If rs1.Fields(4) = Trim(txt_ProblemAttendby) rs1.Fields(5) = Trim(txt_ownerreference) rs1.Fields(6) = " " & txt_Remarks

If rs2.State = 1 Then rs2.Close End If rs2.Source = "select * from maint_bill_detail" rs2.Open rs2.AddNew rs2.Fields(0) = Trim(txt_bilno) rs2.Fields(1) = Trim(txt_sn) - 1 rs2.Fields(2) = Trim(txt_description) rs2.Fields(3) = CLng(txt_quantity) rs2.Fields(4) = Trim(txt_rate) rs2.Fields(5) = Trim(txt_amount) If rs3.State = 1 Then rs3.Close End If rs3.Source = "select * from maint_bill_header" rs3.Open rs3.AddNew rs3.Fields(0) = Trim(txt_bilno.Text) rs3.Fields(1) = Trim(txt_complaintno) rs3.Fields(2) = Trim(TenantCode) rs3.Fields(3) = msk_dateattended If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from temp_main_bill_detail" rs4.Open rs4.AddNew rs4.Fields(0) = Trim(txt_bilno) rs4.Fields(1) = Trim(txt_sn) rs4.Fields(2) = Trim(txt_description) rs4.Fields(3) = CLng(txt_quantity) rs4.Fields(4) = Trim(txt_rate) rs4.Fields(5) = Trim(txt_amount) rs1.Update rs2.Update rs3.Update rs4.Update Adodc1.Refresh End Sub Private Sub txt_quantity_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii)

If KeyAscii = 13 Then txt_rate.SetFocus End If End Sub Private Sub txt_rate_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then txt_amount = txt_quantity * txt_rate cmd_next.SetFocus End If End Sub Private Sub txt_Remarks_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then cmd_create.SetFocus End If End Sub

Dim ownername As String Dim i As Integer Dim propertycode As String Dim proptenantname As String Dim TenantCode As String Dim propownercode Private Sub Cmb_Nature_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Txt_SuitableTime.SetFocus End If End Sub Private Sub cmb_propertycode_Click() i = InStr(1, Cmb_PropertyCode, "/", vbTextCompare) Txt_OwnerCode = Trim(Mid(Cmb_PropertyCode, 1, i - 1)) ownername = Trim(Mid(Cmb_PropertyCode.Text, i + 4, Len(Cmb_PropertyCode.Text) - i + 4)) propertycode = Trim(Mid(Cmb_PropertyCode.Text, 1, i + 5)) If rs1.State = 1 Then rs1.Close End If If Opt_BillFor(0).Value = True Then rs1.Source = "SELECT Tenant_name,tenant_code From Tenant_Master WHERE property_code = '" & propertycode & "'" rs1.Open proptenantname = rs1.Fields(0) Txt_Name = proptenantname TenantCode = rs1.Fields(1) End If If rs1.State = 1 Then rs1.Close End If If Opt_BillFor(1).Value = True Then rs1.Source = "SELECT owner_code from owner_contact where name='" & ownername & "'" rs1.Open propownercode = rs1.Fields(0) Txt_Name = propownercode 'TenantCode = rs1.Fields(1) End If If Opt_BillFor(0).Value = True Then Txt_Name = proptenantname Else Txt_Name = ownername End If End Sub

Private Sub Cmb_PropertyCode_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Cmb_Nature.SetFocus End If End Sub Private Sub Cmd_Exit_Click() Unload Me End Sub Private Sub cmd_save_Click() If Cmb_PropertyCode = "" Then MsgBox "Please Select the Property Code", vbInformation, "Property Management" Cmb_PropertyCode.SetFocus Exit Sub Else If Cmb_Nature = "" Then MsgBox "Please Select the Complaint Nature", vbInformation, "Property Management" Cmb_Nature.SetFocus Exit Sub Else If Txt_SuitableTime = " : " Then MsgBox "Please Select the Suitable Time to Attend the Complaint", vbInformation, "Property Management" Txt_SuitableTime.SetFocus Exit Sub Else If Txt_description = "" Then MsgBox "Please Enter the Complaint Description", vbInformation, "Property Management" Txt_description.SetFocus Exit Sub Else If Txt_ReceviedBy = "" Then MsgBox "Please Enter the Name of Person", vbInformation, "Property Management" Txt_ReceviedBy.SetFocus Exit Sub End If End If End If End If End If savedata MsgBox "Your Data is Successfully Saved", vbInformation, "Property Management"

Unload Me End Sub Private Sub Form_Load() Txt_Date = Date Txt_Time = Time conn rs1.Source = "SELECT Property_Master.owner_code, Property_Master.property_no , Owner_Contact.Name From Property_Master, Owner_Contact WHERE Property_Master.owner_code = Owner_Contact.owner_code AND property_Master.status = 'O'" rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst While rs1.EOF = False Cmb_PropertyCode.AddItem Trim(rs1.Fields(1) & " " & rs1.Fields(2)) rs1.MoveNext Wend End If rs2.Source = "select complaint_no from complaint_master" rs2.Open If rs2.EOF = True Then Txt_ComplaintNo = "CMP1" Else Txt_ComplaintNo = "CMP" & rs2.RecordCount + 1 End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs1 = Nothing Set rs2 = Nothing Set cn = Nothing End Sub Private Sub Opt_BillFor_Click(Index As Integer) Cmb_PropertyCode.Clear If Index = 1 Then Lbl_Name.Caption = "Owner Name" If rs1.State = 1 Then rs1.Close End If rs1.Source = "SELECT Property_Master.owner_code,Property_Master.property_no , Owner_Contact.Name

From Property_Master, Owner_Contact WHERE Property_Master.owner_code = Owner_Contact.owner_code AND Property_Master.Property_nature = 'Maintainence'" rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst While rs1.EOF = False Cmb_PropertyCode.AddItem rs1.Fields(1) & " " & rs1.Fields(2) rs1.MoveNext Wend If Cmb_PropertyCode <> "" Then ownername = Trim(Mid(Cmb_PropertyCode.Text, i + 3, Len(Cmb_PropertyCode.Text) - i + 3)) End If Txt_Name = "" End If Else Lbl_Name.Caption = "Tenant Name" If rs1.State = 1 Then rs1.Close End If rs1.Source = "SELECT Property_Master.owner_code, Property_Master.property_no , Owner_Contact.Name From Property_Master, Owner_Contact WHERE Property_Master.owner_code = Owner_Contact.owner_code AND property_Master.status = 'O'" rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst While rs1.EOF = False Cmb_PropertyCode.AddItem Trim(rs1.Fields(1) & " rs1.MoveNext Wend End If Txt_Name = "" End If End Sub Private Sub savedata() If rs2.State = 1 Then rs2.Close End If rs2.Source = "Select * from complaint_master" rs2.Open rs2.AddNew rs2.Fields(0) = Txt_ComplaintNo

" & rs1.Fields(2))

If Opt_BillFor(0).Value = True Then rs2.Fields(1) = TenantCode End If If Opt_BillFor(1).Value = True Then rs2.Fields(1) = propownercode End If rs2.Fields(2) = Trim(Txt_Date) rs2.Fields(3) = Trim(Txt_Time) rs2.Fields(4) = Trim(Cmb_Nature) rs2.Fields(5) = Trim(Txt_description) rs2.Fields(6) = Trim(Txt_SuitableTime) rs2.Fields(7) = Trim(Txt_ReceviedBy) If Opt_BillFor(0).Value = True Then rs2.Fields(8) = "T" Else rs2.Fields(8) = "M" End If rs2.Fields(9) = propertycode rs2.Fields(10) = "N" rs2.Update End Sub Private Sub Txt_description_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_ReceviedBy.SetFocus End If End Sub Private Sub Txt_ReceviedBy_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Cmd_Save.SetFocus End If End Sub Private Sub Txt_SuitableTime_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Txt_description.SetFocus End If End Sub Private Sub Txt_SuitableTime_LostFocus() If Mid(Txt_SuitableTime, 1, 2) > 24 Or Mid(Txt_SuitableTime, 4, 2) > 60 Then MsgBox "Please Enter The Valid Time", vbInformation, "Property Management" Txt_SuitableTime.SetFocus Exit Sub End If End Sub

Dim r As Integer Dim list As ListItem Private Sub Cmd_Exit_Click() Unload Me End Sub Private Sub cmd_save_Click() rs.Source = "Select * from Monthly_Bill_Header where Tenant_no =" & "'" & txt_tenantrefference.Text & "'" & " " & "and" & " " & "month_nm" & "=" & "'" & txt_billmonth.Text & "'" & " " & "and" & " " & "bill_year" & "=" & txt_billyear.Text & "" rs.Open If rs.RecordCount <> 0 Then MsgBox "Bill for the selected month IS Alreads Paid ", vbInformation, "Property Management" rs.Close Exit Sub End If If rs.State = 1 Then rs.Close End If rs.Source = "select * from Monthly_Bill_Header" rs.Open rs.AddNew rs(0) = Trim(txt_billno) rs(1) = Trim(txt_bildate) rs(2) = Trim(txt_billmonth) rs(3) = Trim(txt_billyear) rs(4) = Trim(txt_tenantrefference) rs(5) = Trim(txt_billamount) rs(6) = "U" rs.Update rs.Close rs1.Source = "select * from Monthly_Bill_Detail" rs1.Open rs1.AddNew rs1(0) = Trim(txt_billno) rs1(1) = Trim(txt_particular) rs1(2) = Trim(txt_billamount) rs1(3) = Trim(txt_bildate) rs1.Update rs1.Close MsgBox " The Bill is created ", vbInformation, "Property Management" cmd_save.Enabled = False End Sub

Private Sub Form_Load() conn lv1 cmd_save.Enabled = False txt_billmonth.Enabled = False End Sub Private Sub lv1() rs.Source = "SELECT * from tenant_master Where Status ='O'" rs.Open If rs.EOF = True Then lv.Enabled = False Else While rs.EOF = False Set list = lv.ListItems.Add(, , rs.Fields(0)) list.SubItems(1) = rs.Fields(1) list.SubItems(2) = rs.Fields(2) list.SubItems(3) = rs.Fields(3) list.SubItems(4) = rs.Fields(4) list.SubItems(5) = rs.Fields(5) list.SubItems(6) = rs.Fields(8) rs.MoveNext Wend End If rs.Close End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set rs1 = Nothing Set cn = Nothing End Sub Private Sub lv_DblClick() cmd_save.Enabled = False rs.Source = "select Monthly_rent from tenant_master where tenant_code='" & lv.SelectedItem & "'" rs.Open txt_billamount = rs(0) rs.Close txt_billno = lv.SelectedItem & "/" & MonthName(Month(Date), True) & "/" & Year(Date) txt_billyear = Year(Date) txt_billmonth = MonthName(Month(Date), False) txt_bildate = Format(Date, "dd/mm/yyyy")

txt_particular = "Rent for the month of " & MonthName(Month(Date), False) & " " & Year(Date) txt_tenantrefference = lv.SelectedItem cmd_save.Enabled = True txt_billmonth.Enabled = True End Sub Private Sub txt_billmonth_Click() txt_billno = lv.SelectedItem & "/" & txt_billmonth.Text txt_particular = "Rent for the month of " & txt_billmonth.Text & " " & Year(Date) cmd_save.Enabled = True End Sub

Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim ads As Boolean Private Sub cmd_addpicture_Click() If ads = True Then ads = False If cmd_addpicture.Caption = "&Select Company Logo" Then addlogo Exit Sub End If If cmd_addpicture.Caption = "&Modify Company Logo" Then addlogo Unload Me End If 'End If End Sub Private Sub cmd_addpicture_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Cmd_Save.SetFocus Exit Sub End If End Sub Private Sub Cmd_Cancel_Click() Unload Me End Sub Private Sub cmd_save_Click() If Txt_Name = "" Then MsgBox " Please Enter the Required Field", vbInformation, "Property Management" 'Txt_Name.BackColor = &HC0FFFF Txt_Name.SetFocus Exit Sub Else If Txt_Address = "" Then MsgBox " Please Enter the Required Field", vbInformation, "Property Management" 'Txt_Address.BackColor = &HC0FFFF Txt_Address.SetFocus Exit Sub Else If Txt_City = "" Then MsgBox " Please Enter the Required Field", vbInformation, "Property Management" Txt_City.BackColor = &HC0FFFF

Txt_City.SetFocus Exit Sub Else If Txt_State = "" Then MsgBox " Please Enter the Required Field", vbInformation, "Property Management" Txt_State.BackColor = &HC0FFFF Txt_State.SetFocus Exit Sub Else If txt_Country = "" Then MsgBox " Please Enter the Required Field", vbInformation, "Property Management" txt_Country.BackColor = &HC0FFFF txt_Country.SetFocus Exit Sub Else If Txt_Telephone = "" Then MsgBox " Please Enter the Required Field", vbInformation, "Property Management" Txt_Telephone.BackColor = &HC0FFFF Txt_Telephone.SetFocus Exit Sub End If End If End If End If End If End If If rs.EOF = True Then rs.AddNew End If rs(0) = Txt_Name rs(1) = Txt_Address rs(2) = Txt_City rs(3) = Txt_State rs(4) = txt_Country rs(5) = Txt_ZipCode rs(6) = Txt_Telephone rs(7) = Txt_Fax rs(8) = Txt_Email rs(10) = Txt_Name rs.Update MsgBox "Enteries has Successfully Entered", vbInformation Unload Me

End Sub Private Sub Form_Load() With cn .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Property Manager.mdb;Persist Security Info=False" .CursorLocation = adUseClient .CommandTimeout = 60 .Open End With With rs .ActiveConnection = cn .LockType = adLockOptimistic .CursorType = adOpenDynamic .Source = "select * from company_info" .Open End With If rs.EOF = True Then Else Txt_Name.Text = rs.Fields(0) Txt_Address.Text = rs.Fields(1) Txt_City.Text = rs.Fields(2) Txt_State.Text = rs.Fields(3) txt_Country.Text = rs.Fields(4) Txt_ZipCode.Text = rs.Fields(5) Txt_Telephone.Text = rs.Fields(6) Txt_Fax.Text = rs.Fields(7) Txt_Email.Text = rs.Fields(8)

End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set cn = Nothing End Sub Private Sub Label11_Click() ' If ads = True Then ' Exit Sub ' End If ' If ads = False Then ' addlogo ' Exit Sub

' End If End Sub Private Sub Picture1_Click() If ads = True Then Exit Sub End If If ads = False Then addlogo Exit Sub End If End Sub Private Sub Txt_Address_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_City.SetFocus Exit Sub End If End Sub Private Sub txt_city_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_State.SetFocus Exit Sub End If End Sub Private Sub txt_Country_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_ZipCode.SetFocus Exit Sub End If End Sub Private Sub Txt_Fax_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then Txt_Email.SetFocus Exit Sub End If End Sub

Private Sub Txt_Name_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_Address.SetFocus Exit Sub End If End Sub Private Sub Txt_State_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_Country.SetFocus Exit Sub End If End Sub Private Sub Txt_Telephone_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then Txt_Fax.SetFocus Exit Sub End If End Sub Private Sub txt_zipcode_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then Txt_Telephone.SetFocus Exit Sub End If End Sub Private Sub addlogo() On Error GoTo errhandler cd1.CancelError = True cd1.Filter = "All files(*.*)|Gif Image(*.gif)| Bitmap Image(*.bmp)" cd1.Flags = cdlCCFullOpen cd1.DefaultExt = "(*.gif)" cd1.ShowOpen picpath = cd1.FileName Picture1.Picture = LoadPicture(picpath) Label11.Visible = False If apic = "" Then rs(9) = picpath Else rs(9) = picpath End If

rs.Update ads = True MsgBox "Company Logo Updated", vbInformation, Frm_DetailCompany.Caption Exit Sub errhandler: MsgBox " Kindly Select the Company Logo", vbCritical + vbApplicationModal, "Select Company Logo" Exit Sub End Sub

Private Sub CancelButton_Click() Unload Me End Sub Private Sub Form_Load() If cn.State = 1 Then cn.Close End If conn If rs.State = 1 Then rs.Close End If If rs1.State = 1 Then rs1.Close End If todate.Text = Format(Date, "dd/mm/yyyy") Customername.Text = TenantName fromdate.Text = fromdt lbltill.Text = tilldate lblpropcode.Text = propcode 'periodmonths.Text = period rs.Source = "select * from company_info" rs.Open companyname.Text = rs(0) rs.Close rs.Source = "select * from Tenant_master where property_code='" & propcode & " '" rs.Open periodmonths.Text = rs(3) rs.Close End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set rs1 = Nothing Set rs2 = Nothing Set cn = Nothing End Sub Private Sub OKButton_Click() 'to pass an entry to the transaction master rs1.Source = "select * from T_Property_Transaction_Ms" rs1.Open rs1.AddNew

rs1(0) = propcode rs1(1) = todate.Text rs1(2) = lblcontracttype.Caption & "for the property " & propcode rs1(5) = Customername.Text rs1(6) = "V" rs1.Update rs1.Close 'to update the status of property in the tenant master ' rs2.Source = "select * from tenant_master" rs2.Source = "Select * from Tenant_Master where property_code =" & "'" & lblpropcode.Text & "'" & " " & "and" & " " & "Tenant_name" & "=" & "'" & Customername.Text & "'" & " " & "and" & " " & "Status" & "=" & "'" & "O" & "'" rs2.Open If rs2.RecordCount <> 0 Then rs2(7) = "V" ' now this property is no more on tenancy MsgBox rs2(6) rs2.Update rs2.Close End If rs2.Source = "Select * from property_Master where property_no =" & "'" & lblpropcode.Text & "' and Status='O'" rs2.Open If rs2.RecordCount <> 0 Then rs2(3) = "V" ' now this property is no more on tenancy MsgBox rs2(6) rs2.Update rs2.Close End If OKButton.Enabled = False 'CancelButton.Caption = "Close" Unload Me End Sub Private Sub OKButton_GotFocus() 'sd = prd.Text 'top1 = sd * 28 'top2 = CDate(Format((fdt.Text), "dd/mm/yyyy")) + top1 'tdt.Text = Format(top2, "dd/mm/yyyy") End Sub Private Sub prd_Change() Customer(13).Caption = "This contract is from" sd = prd.Text top1 = sd * 28 top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1 lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub Private Sub prd_Click()

Customer(13).Caption = "This contract is from" sd = prd.Text top1 = sd * 28 top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1 lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub Private Sub prd_LostFocus() 'Customer(13).Caption = "This contract is from" 'sd = prd.Text 'top1 = sd * 28 'top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1 'lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub

Dim propertycode As String Dim propertystatus As String Private Sub cmb_facingdirection_LostFocus() cmb_facingdirection.BackColor = &H80000005 End Sub Private Sub cmd_addpicture_Click() propcode = txt_propertycode Me.Hide frm_propertyphoto.Show 1 End Sub Private Sub Cmd_Exit_Click() Unload Me End Sub Private Sub cmd_householditem_Click() propcode = propertycode Unload Me frm_houshold.Show 1 End Sub Private Sub cmd_save_Click() If txt_ownername = "" Then MsgBox "Please Enter the Owner Name", vbInformation, "Property Management" txt_ownername.SetFocus txt_ownername.BackColor = &HC0FFFF Exit Sub Else If txt_houseno = "" Then MsgBox "Please Enter the House Number", vbInformation, "Property Management" txt_houseno.SetFocus txt_houseno.BackColor = &HC0FFFF Exit Sub Else If txt_location = "" Then MsgBox "Please Enter the Street Location", vbInformation, "Property Management" txt_location.SetFocus txt_location.BackColor = &HC0FFFF Exit Sub Else If txt_city = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_city.SetFocus txt_city.BackColor = &HC0FFFF Exit Sub

Else If txt_zipcode = "" Then MsgBox "Please Enter the Zipcode Number", vbInformation, "Property Management" txt_zipcode.SetFocus txt_zipcode.BackColor = &HC0FFFF Exit Sub Else If txt_renthouseno = "" Then MsgBox "Please Enter the House Number", vbInformation, "Property Management" txt_renthouseno.SetFocus txt_renthouseno.BackColor = &HC0FFFF Exit Sub Else If txt_rentstreet = "" Then MsgBox "Please Enter the Street Number", vbInformation, "Property Management" txt_rentstreet.SetFocus txt_rentstreet.BackColor = &HC0FFFF Exit Sub Else If txt_rentcity = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_rentcity.SetFocus txt_rentcity.BackColor = &HC0FFFF Exit Sub Else If txt_rentzip = "" Then MsgBox "Please Enter the ZipCode Number", vbInformation, "Property Management" txt_rentzip.SetFocus txt_rentzip.BackColor = &HC0FFFF Exit Sub Else If txt_rentamount = "" Then MsgBox "Please Enter the Rent Amount", vbInformation, "Property Management" txt_rentamount.SetFocus txt_rentamount.BackColor = &HC0FFFF Exit Sub Else If txt_plotsize = " X " And txt_plotsize.Visible = True Then MsgBox "Please Enter the Plot Size", vbInformation, "Property Management" txt_plotsize.SetFocus txt_plotsize.BackColor = &HC0FFFF Exit Sub Else If opt_drawing(0).Value = False And opt_drawing(1).Value = False Then MsgBox "Please Select Seperate Drawing && Dining Room Or Common Drawing && Dining Room", vbInformation, "Property Management"

opt_drawing(0).SetFocus opt_drawing(0).BackColor = &HC0FFFF Exit Sub Else If txt_builtarea = "" Then MsgBox "Please Enter the Build Area", vbInformation, "Property Management" txt_builtarea.SetFocus txt_builtarea.BackColor = &HC0FFFF Exit Sub Else If txt_toilets = "" And txt_toilets.Visible = True Then MsgBox "Please Enter the Number of Toilets", vbInformation, "Property Management" txt_toilets.SetFocus txt_toilets.BackColor = &HC0FFFF Exit Sub Else If cmb_facingdirection = "" Then MsgBox "Please Select the Facing Direction", vbInformation, "Property Management" cmb_facingdirection.SetFocus cmb_facingdirection.BackColor = &HC0FFFF Exit Sub Else If txt_bedrooms = "" And txt_bedrooms.Visible = True Then MsgBox "Please Enter the Number of Bedrooms", vbInformation, "Property Management" txt_bedrooms.SetFocus txt_bedrooms.BackColor = &HC0FFFF Exit Sub Else If txt_flrno = "" And txt_flrno.Visible = True Then MsgBox "Please Enter the Floor Number", vbInformation, "Property Management" txt_flrno.SetFocus txt_flrno.BackColor = &HC0FFFF Exit Sub End If End If End If End If End If End If End If End If End If End If

End If End If End If End If End If End If End If savedata i = MsgBox("Your Data is Successfully Saved,Would you like to add Picture and Household items", vbInformation + vbYesNo) cmd_save.Enabled = False If i = vbYes Then cmd_householditem.Enabled = True End If If i = vbNo Then Unload Me End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set rs1 = Nothing Set rs2 = Nothing Set rs3 = Nothing Set rs4 = Nothing Set cn = Nothing End Sub Private Sub opt_drawing_LostFocus(Index As Integer) ' opt_drawing(0).BackColor = &HFF8080 End Sub Private Sub opt_housetype_Click(Index As Integer) option_check If opt_housetype(2).Value = True Then Customer(20).Visible = True Customer(21).Visible = True txt_plotsize.Visible = True txt_builtarea.Visible = True chk_garage.Visible = True chk_parkspace.Visible = True cmb_facingdirection.Visible = True txt_flrno.Visible = True Customer(15).Visible = True Customer(16).Visible = True 'label.Visible = True lbl_change(31).Caption = "Floor No" lbl_change(31).Visible = True

Customer(18).Visible = False Customer(23).Visible = False txt_toilets.Visible = False txt_bedrooms.Visible = False opt_drawing(0).Visible = False opt_drawing(1).Visible = False Customer(28).Visible = False Customer(14).Visible = False Customer(32).Visible = False Customer(27).Visible = False Customer(24).Visible = False garden.Visible = False chk_attic.Visible = False chk_balcony.Visible = False chk_garden.Visible = False chk_portico.Visible = False chk_store.Visible = False chk_terrace.Visible = False chk_swim.Visible = False chk_garage.Left = 1770 chk_parkspace.Left = 1770 txt_flrno.Left = 1770 Customer(15).Left = 100 Customer(16).Left = 600 lbl_change(31).Left = 600 Exit Sub End If If opt_housetype(1).Value = True Then Customer(20).Visible = False txt_plotsize.Visible = False txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = True chk_swim.Visible = False lbl_change(31).Caption = "Floor No" chk_garden.Visible = True Customer(20).Visible = False

Customer(21).Visible = True Customer(18).Visible = True Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True Customer(27).Visible = True Customer(24).Visible = True txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6400 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 5070 Exit Sub End If If opt_housetype(0).Value = True Then Customer(20).Visible = True txt_plotsize.Visible = True txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = False chk_swim.Visible = True lbl_change(31).Caption = "Swim Pool" chk_garden.Visible = True Customer(20).Visible = True Customer(21).Visible = True Customer(18).Visible = True Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True

Customer(27).Visible = True Customer(24).Visible = True txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6090 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 5070 Exit Sub End If End Sub Private Sub txt_bedrooms_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_bedrooms_LostFocus() txt_bedrooms.BackColor = &H80000005 End Sub Private Sub txt_builtarea_Change() opt_housetype(0).Enabled = False opt_housetype(1).Enabled = False opt_housetype(2).Enabled = False End Sub Private Sub txt_builtarea_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_builtarea_LostFocus() txt_builtarea.BackColor = &H80000005 End Sub Private Sub txt_city_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_zipcode.SetFocus End If End Sub Private Sub txt_city_LostFocus() txt_city.BackColor = &H80000005

End Sub Private Sub Txt_Email_KeyPress(KeyAscii As Integer) KeyAscii = smallletter(KeyAscii) If KeyAscii = 13 Then txt_renthouseno.SetFocus End If End Sub Private Sub txt_faxno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_mobile.SetFocus End If End Sub Private Sub txt_flrno_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_houseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_location.SetFocus End If End Sub Private Sub txt_houseno_LostFocus() txt_houseno.BackColor = &H80000005 End Sub Private Sub txt_location_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_city.SetFocus End If End Sub Private Sub txt_location_LostFocus() txt_location.BackColor = &H80000005 End Sub Private Sub txt_mobile_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_email.SetFocus End If End Sub

Private Sub txt_otherdescription_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub Private Sub txt_ownername_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_houseno.SetFocus End If End Sub Private Sub txt_ownername_LostFocus() txt_ownername.BackColor = &H80000005 End Sub Private Sub txt_plotsize_LostFocus() txt_plotsize.BackColor = &H80000005 End Sub Private Sub txt_rentamount_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then opt_housetype(0).SetFocus End If End Sub Private Sub txt_rentamount_LostFocus() txt_rentamount.BackColor = &H80000005 End Sub Private Sub txt_rentcity_LostFocus() txt_rentcity.BackColor = &H80000005 End Sub Private Sub txt_renthouseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentstreet.SetFocus End If End Sub Private Sub txt_renthouseno_LostFocus() txt_renthouseno.BackColor = &H80000005 End Sub Private Sub txt_rentstreet_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then

txt_rentcity.SetFocus End If End Sub Private Sub txt_rentstreet_LostFocus() txt_rentstreet.BackColor = &H80000005 End Sub Private Sub txt_renttelphoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentamount.SetFocus End If End Sub Private Sub txt_rentzip_LostFocus() txt_rentzip.BackColor = &H80000005 End Sub Private Sub txt_telephoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_faxno.SetFocus End If End Sub Private Sub txt_toilets_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_toilets_LostFocus() txt_toilets.BackColor = &H80000005 End Sub Private Sub txt_totalbedroom_LostFocus() txt_totalbedroom.BackColor = &H80000005 End Sub Private Sub Form_Load() cmb_facingdirection.Text = "East" Dim SpaceNums As Integer Timer1.Interval = 70 SpaceNums = Int(Me.Width / 50) Me.Caption = "Property for Maintainence" & Space(SpaceNums) Timer1.Enabled = True

conn rs1.Source = "select * from owner_contact" rs1.Open rs2.Source = "select * from property_address" rs2.Open rs3.Source = "select * from property_specifications" rs3.Open rs4.Source = "select * from Property_master" rs4.Open If rs1.EOF = True Then txt_customercode = "PR1" Else txt_customercode = "PR" & rs1.RecordCount + 1 End If txt_propertycode = txt_customercode txt_propertyaddon = Format(Date, "DD/mm/yyyy") option_check End Sub Private Sub cmd_save_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cmd_exit.SetFocus Exit Sub End If End Sub Private Sub txt_rentcity_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentzip.SetFocus Exit Sub End If End Sub Private Sub txt_renttelephoneno_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txt_rentamount.SetFocus Exit Sub End If End Sub

Private Sub txt_rentzip_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_renttelphoneno.SetFocus Exit Sub End If End Sub Private Sub txt_zipcode_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_telephoneno.SetFocus Exit Sub End If End Sub Private Sub savedata() On Error GoTo errorhandler If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from owner_contact" rs1.Open If rs2.State = 1 Then rs2.Close End If rs2.Source = "select * from property_address" rs2.Open If rs3.State = 1 Then rs3.Close End If rs3.Source = "select * from property_specifications" rs3.Open rs1.AddNew rs1.Fields(0) = txt_customercode rs1.Fields(1) = Trim(txt_ownername) rs1.Fields(2) = Trim(txt_houseno & "," & txt_location) rs1.Fields(3) = Trim(txt_city) rs1.Fields(4) = Trim(txt_zipcode) rs1.Fields(5) = Trim(txt_telephoneno) rs1.Fields(6) = Trim(txt_mobile) rs1.Fields(7) = Trim(txt_email) rs1.Fields(8) = "ACTIVE" rs1.Fields(9) = Trim(txt_faxno)

rs2.AddNew rs2.Fields(0) = propertycode rs2.Fields(1) = txt_customercode rs2.Fields(2) = Trim(txt_renthouseno & "," & txt_rentstreet) rs2.Fields(3) = Trim(txt_rentstreet) rs2.Fields(4) = Trim(txt_rentcity) rs2.Fields(5) = Trim(txt_rentzip) rs2.Fields(6) = Trim(txt_renttelphoneno) rs3.AddNew rs3.Fields(0) = propertycode rs3.Fields(1) = Trim(txt_plotsize) rs3.Fields(2) = Trim(txt_builtarea) If opt_housetype(0).Value = True Or opt_housetype(1).Value = True Then rs3.Fields(3) = Trim(txt_bedrooms) rs3.Fields(4) = Trim(txt_toilets) End If If chk_swim.Value = 1 Then rs3.Fields(5) = "True" Else rs3.Fields(5) = "False" End If If opt_drawing(0).Value = True Then rs3.Fields(6) = "S" Else rs3.Fields(6) = "C" End If If chk_garage.Value = 1 Then rs3.Fields(7) = "True" Else rs3.Fields(7) = "False" End If If chk_parkspace.Value = 1 Then rs3.Fields(8) = "True" Else rs3.Fields(8) = "False" End If If chk_balcony.Value = 1 Then rs3.Fields(9) = "True" Else rs3.Fields(9) = "False" End If If chk_store.Value = 1 Then rs3.Fields(10) = "True" Else rs3.Fields(10) = "False" End If

If chk_portico.Value = 1 Then rs3.Fields(11) = "True" Else rs3.Fields(11) = "False" End If If chk_garage.Value = 1 Then rs3.Fields(12) = "True" Else rs3.Fields(12) = "False" End If rs3.Fields(13) = Trim(txt_otherdescription) If opt_housetype(1).Value = True Or opt_housetype(2).Value = True Then If txt_flrno = "" Then rs3.Fields(14) = 0 Else rs3.Fields(14) = txt_flrno End If End If If chk_terrace.Value = 1 Then rs3.Fields(15) = "True" Else rs3.Fields(15) = "False" End If If chk_attic.Value = 1 Then rs3.Fields(16) = "True" Else rs3.Fields(16) = "False" End If If cmb_facingdirection.Text = "" Then cmb_facingdirection.Text = "No Direction" Else rs3.Fields(17) = cmb_facingdirection.Text End If If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from Property_master" rs4.Open rs4.AddNew rs4.Fields(0) = propertycode rs4.Fields(1) = txt_customercode rs4.Fields(2) = Trim(propertystatus) rs4.Fields(3) = "V" rs4.Fields(5) = "Maintainence"

rs4.Fields(6) = Trim(txt_propertyaddon) rs4.Fields(8) = Trim(txt_rentamount) If rs.State = 1 Then rs.Close End If rs.Source = "select * from t_property_transaction_ms" rs.Open rs.AddNew rs.Fields(0) = propertycode rs.Fields(1) = txt_propertyaddon rs.Fields(2) = "Property is Added For Maintainence" rs.Fields(5) = txt_ownername rs.Fields(6) = "V" rs1.Update rs2.Update rs3.Update rs4.Update rs.Update Exit Sub errorhandler: cn.Execute "delete from owner_contact where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_address where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_specifications where property_cd='" & propertycode & "'" cn.Execute "delete from property_master where property_no='" & propertycode & "'" cn.Execute "delete from t_property_transaction_ms where property_no='" & propertycode & "'" MsgBox " Property Master is Enquired with Some Problem", vbInformation, "Property Management" Exit Sub End Sub Private Sub option_check() If opt_housetype(0).Value = True Then If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from property_master where property_type='Bunglow'" rs4.Open If rs4.EOF = True Then propertycode = txt_propertycode & "/B1" propertystatus = "Bunglow"

Else propertycode = txt_propertycode & "/B" & rs4.RecordCount + 1 propertystatus = "Bunglow" End If Exit Sub Else If opt_housetype(1).Value = True Then If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from property_master where property_type='Flat'" rs4.Open If rs4.EOF = True Then propertycode = txt_propertycode & "/F1" propertystatus = "Flat" Else propertycode = txt_propertycode & "/F" & rs4.RecordCount + 1 propertystatus = "Flat" End If Exit Sub Else If opt_housetype(2).Value = True Then If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from property_master where property_type='Commercial'" rs4.Open If rs4.EOF = True Then propertycode = txt_propertycode & "/C1" propertystatus = "Commercial" Else propertycode = txt_propertycode & "/C" & rs4.RecordCount + 1 propertystatus = "Commercial" End If Exit Sub End If End If End If End Sub Private Sub Timer1_Timer() Me.Caption = Right(Me.Caption, Len(Me.Caption) - 1) & Left(Me.Caption, 1) End Sub

Dim propertycode As String Dim propertystatus As String Private Sub cmb_facingdirection_LostFocus() cmb_facingdirection.BackColor = &H80000005 End Sub Private Sub cmd_addpicture_Click() propcode = txt_propertycode Me.Hide frm_propertyphoto.Show 1 End Sub Private Sub Cmd_Exit_Click() Unload Me End Sub Private Sub cmd_householditem_Click() propcode = propertycode Unload Me frm_houshold.Show 1 End Sub Private Sub cmd_save_Click() If txt_ownername = "" Then MsgBox "Please Enter the Owner Name", vbInformation, "Property Management" txt_ownername.SetFocus txt_ownername.BackColor = &HC0FFFF Exit Sub Else If txt_houseno = "" Then MsgBox "Please Enter the House Number", vbInformation, "Property Management" txt_houseno.SetFocus txt_houseno.BackColor = &HC0FFFF Exit Sub Else If txt_location = "" Then MsgBox "Please Enter the Street Location", vbInformation, "Property Management" txt_location.SetFocus txt_location.BackColor = &HC0FFFF Exit Sub Else If txt_city = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_city.SetFocus txt_city.BackColor = &HC0FFFF Exit Sub

Else If txt_zipcode = "" Then MsgBox "Please Enter the Zipcode Number", vbInformation, "Property Management" txt_zipcode.SetFocus txt_zipcode.BackColor = &HC0FFFF Exit Sub Else If txt_renthouseno = "" Then MsgBox "Please Enter the House Number", vbInformation, "Property Management" txt_renthouseno.SetFocus txt_renthouseno.BackColor = &HC0FFFF Exit Sub Else If txt_rentstreet = "" Then MsgBox "Please Enter the Street Number", vbInformation, "Property Management" txt_rentstreet.SetFocus txt_rentstreet.BackColor = &HC0FFFF Exit Sub Else If txt_rentcity = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_rentcity.SetFocus txt_rentcity.BackColor = &HC0FFFF Exit Sub Else If txt_rentzip = "" Then MsgBox "Please Enter the ZipCode Number", vbInformation, "Property Management" txt_rentzip.SetFocus txt_rentzip.BackColor = &HC0FFFF Exit Sub Else If txt_rentamount = "" Then MsgBox "Please Enter the Rent Amount", vbInformation, "Property Management" txt_rentamount.SetFocus txt_rentamount.BackColor = &HC0FFFF Exit Sub Else If txt_plotsize = " X " And txt_plotsize.Visible = True Then MsgBox "Please Enter the Plot Size", vbInformation, "Property Management" txt_plotsize.SetFocus txt_plotsize.BackColor = &HC0FFFF Exit Sub Else If opt_drawing(0).Value = False And opt_drawing(1).Value = False Then MsgBox "Please Select Seperate Drawing && Dining Room Or Common Drawing && Dining Room", vbInformation, "Property Management"

opt_drawing(0).SetFocus opt_drawing(0).BackColor = &HC0FFFF Exit Sub Else If txt_builtarea = "" Then MsgBox "Please Enter the Build Area", vbInformation, "Property Management" txt_builtarea.SetFocus txt_builtarea.BackColor = &HC0FFFF Exit Sub Else If txt_toilets = "" And txt_toilets.Visible = True Then MsgBox "Please Enter the Number of Toilets", vbInformation, "Property Management" txt_toilets.SetFocus txt_toilets.BackColor = &HC0FFFF Exit Sub Else If cmb_facingdirection = "" Then MsgBox "Please Select the Facing Direction", vbInformation, "Property Management" cmb_facingdirection.SetFocus cmb_facingdirection.BackColor = &HC0FFFF Exit Sub Else If txt_bedrooms = "" And txt_bedrooms.Visible = True Then MsgBox "Please Enter the Number of Bedrooms", vbInformation, "Property Management" txt_bedrooms.SetFocus txt_bedrooms.BackColor = &HC0FFFF Exit Sub Else If txt_flrno = "" And txt_flrno.Visible = True Then MsgBox "Please Enter the Floor Number", vbInformation, "Property Management" txt_flrno.SetFocus txt_flrno.BackColor = &HC0FFFF Exit Sub End If End If End If End If End If End If End If End If End If End If

End If End If End If End If End If End If End If savedata i = MsgBox("Your Data is Successfully Saved,Would you like to add Picture and Household items", vbInformation + vbYesNo) cmd_save.Enabled = False If i = vbYes Then cmd_householditem.Enabled = True End If If i = vbNo Then Unload Me End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set rs1 = Nothing Set rs2 = Nothing Set rs3 = Nothing Set rs4 = Nothing Set cn = Nothing End Sub Private Sub opt_drawing_LostFocus(Index As Integer) ' opt_drawing(0).BackColor = &HFF8080 End Sub Private Sub opt_housetype_Click(Index As Integer) option_check If opt_housetype(2).Value = True Then Customer(20).Visible = True Customer(21).Visible = True txt_plotsize.Visible = True txt_builtarea.Visible = True chk_garage.Visible = True chk_parkspace.Visible = True cmb_facingdirection.Visible = True txt_flrno.Visible = True Customer(15).Visible = True Customer(16).Visible = True 'label.Visible = True lbl_change(31).Caption = "Floor No" lbl_change(31).Visible = True

Customer(18).Visible = False Customer(23).Visible = False txt_toilets.Visible = False txt_bedrooms.Visible = False opt_drawing(0).Visible = False opt_drawing(1).Visible = False Customer(28).Visible = False Customer(14).Visible = False Customer(32).Visible = False Customer(27).Visible = False Customer(24).Visible = False garden.Visible = False chk_attic.Visible = False chk_balcony.Visible = False chk_garden.Visible = False chk_portico.Visible = False chk_store.Visible = False chk_terrace.Visible = False chk_swim.Visible = False chk_garage.Left = 1770 chk_parkspace.Left = 1770 txt_flrno.Left = 1770 Customer(15).Left = 100 Customer(16).Left = 600 lbl_change(31).Left = 600 Exit Sub End If If opt_housetype(1).Value = True Then Customer(20).Visible = False txt_plotsize.Visible = False txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = True chk_swim.Visible = False lbl_change(31).Caption = "Floor No" chk_garden.Visible = True Customer(20).Visible = False

Customer(21).Visible = True Customer(18).Visible = True Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True Customer(27).Visible = True Customer(24).Visible = True txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6400 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 5070 Exit Sub End If If opt_housetype(0).Value = True Then Customer(20).Visible = True txt_plotsize.Visible = True txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = False chk_swim.Visible = True lbl_change(31).Caption = "Swim Pool" chk_garden.Visible = True Customer(20).Visible = True Customer(21).Visible = True Customer(18).Visible = True Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True

Customer(27).Visible = True Customer(24).Visible = True txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6090 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 5070 Exit Sub End If End Sub Private Sub txt_bedrooms_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_bedrooms_LostFocus() txt_bedrooms.BackColor = &H80000005 End Sub Private Sub txt_builtarea_Change() opt_housetype(0).Enabled = False opt_housetype(1).Enabled = False opt_housetype(2).Enabled = False End Sub Private Sub txt_builtarea_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_builtarea_LostFocus() txt_builtarea.BackColor = &H80000005 End Sub Private Sub txt_city_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_zipcode.SetFocus End If End Sub Private Sub txt_city_LostFocus() txt_city.BackColor = &H80000005

End Sub Private Sub Txt_Email_KeyPress(KeyAscii As Integer) KeyAscii = smallletter(KeyAscii) If KeyAscii = 13 Then txt_renthouseno.SetFocus End If End Sub Private Sub txt_faxno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_mobile.SetFocus End If End Sub Private Sub txt_flrno_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_houseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_location.SetFocus End If End Sub Private Sub txt_houseno_LostFocus() txt_houseno.BackColor = &H80000005 End Sub Private Sub txt_location_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_city.SetFocus End If End Sub Private Sub txt_location_LostFocus() txt_location.BackColor = &H80000005 End Sub Private Sub txt_mobile_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_email.SetFocus End If End Sub

Private Sub txt_otherdescription_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub Private Sub txt_ownername_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_houseno.SetFocus End If End Sub Private Sub txt_ownername_LostFocus() txt_ownername.BackColor = &H80000005 End Sub Private Sub txt_plotsize_LostFocus() txt_plotsize.BackColor = &H80000005 End Sub Private Sub txt_rentamount_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then opt_housetype(0).SetFocus End If End Sub Private Sub txt_rentamount_LostFocus() txt_rentamount.BackColor = &H80000005 End Sub Private Sub txt_rentcity_LostFocus() txt_rentcity.BackColor = &H80000005 End Sub Private Sub txt_renthouseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentstreet.SetFocus End If End Sub Private Sub txt_renthouseno_LostFocus() txt_renthouseno.BackColor = &H80000005 End Sub Private Sub txt_rentstreet_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then

txt_rentcity.SetFocus End If End Sub Private Sub txt_rentstreet_LostFocus() txt_rentstreet.BackColor = &H80000005 End Sub Private Sub txt_renttelphoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentamount.SetFocus End If End Sub Private Sub txt_rentzip_LostFocus() txt_rentzip.BackColor = &H80000005 End Sub Private Sub txt_telephoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_faxno.SetFocus End If End Sub Private Sub txt_toilets_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_toilets_LostFocus() txt_toilets.BackColor = &H80000005 End Sub Private Sub txt_totalbedroom_LostFocus() txt_totalbedroom.BackColor = &H80000005 End Sub Private Sub Form_Load() cmb_facingdirection.Text = "East" Dim SpaceNums As Integer Timer1.Interval = 70 SpaceNums = Int(Me.Width / 50) Me.Caption = "Property for Maintainence" & Space(SpaceNums) Timer1.Enabled = True

conn rs1.Source = "select * from owner_contact" rs1.Open rs2.Source = "select * from property_address" rs2.Open rs3.Source = "select * from property_specifications" rs3.Open rs4.Source = "select * from Property_master" rs4.Open If rs1.EOF = True Then txt_customercode = "PR1" Else txt_customercode = "PR" & rs1.RecordCount + 1 End If txt_propertycode = txt_customercode txt_propertyaddon = Format(Date, "DD/mm/yyyy") option_check End Sub Private Sub cmd_save_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cmd_exit.SetFocus Exit Sub End If End Sub Private Sub txt_rentcity_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentzip.SetFocus Exit Sub End If End Sub Private Sub txt_renttelephoneno_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txt_rentamount.SetFocus Exit Sub End If End Sub

Private Sub txt_rentzip_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_renttelphoneno.SetFocus Exit Sub End If End Sub Private Sub txt_zipcode_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_telephoneno.SetFocus Exit Sub End If End Sub Private Sub savedata() On Error GoTo errorhandler If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from owner_contact" rs1.Open If rs2.State = 1 Then rs2.Close End If rs2.Source = "select * from property_address" rs2.Open If rs3.State = 1 Then rs3.Close End If rs3.Source = "select * from property_specifications" rs3.Open rs1.AddNew rs1.Fields(0) = txt_customercode rs1.Fields(1) = Trim(txt_ownername) rs1.Fields(2) = Trim(txt_houseno & "," & txt_location) rs1.Fields(3) = Trim(txt_city) rs1.Fields(4) = Trim(txt_zipcode) rs1.Fields(5) = Trim(txt_telephoneno) rs1.Fields(6) = Trim(txt_mobile) rs1.Fields(7) = Trim(txt_email) rs1.Fields(8) = "ACTIVE" rs1.Fields(9) = Trim(txt_faxno)

rs2.AddNew rs2.Fields(0) = propertycode rs2.Fields(1) = txt_customercode rs2.Fields(2) = Trim(txt_renthouseno & "," & txt_rentstreet) rs2.Fields(3) = Trim(txt_rentstreet) rs2.Fields(4) = Trim(txt_rentcity) rs2.Fields(5) = Trim(txt_rentzip) rs2.Fields(6) = Trim(txt_renttelphoneno) rs3.AddNew rs3.Fields(0) = propertycode rs3.Fields(1) = Trim(txt_plotsize) rs3.Fields(2) = Trim(txt_builtarea) If opt_housetype(0).Value = True Or opt_housetype(1).Value = True Then rs3.Fields(3) = Trim(txt_bedrooms) rs3.Fields(4) = Trim(txt_toilets) End If If chk_swim.Value = 1 Then rs3.Fields(5) = "True" Else rs3.Fields(5) = "False" End If If opt_drawing(0).Value = True Then rs3.Fields(6) = "S" Else rs3.Fields(6) = "C" End If If chk_garage.Value = 1 Then rs3.Fields(7) = "True" Else rs3.Fields(7) = "False" End If If chk_parkspace.Value = 1 Then rs3.Fields(8) = "True" Else rs3.Fields(8) = "False" End If If chk_balcony.Value = 1 Then rs3.Fields(9) = "True" Else rs3.Fields(9) = "False" End If If chk_store.Value = 1 Then rs3.Fields(10) = "True" Else rs3.Fields(10) = "False" End If

If chk_portico.Value = 1 Then rs3.Fields(11) = "True" Else rs3.Fields(11) = "False" End If If chk_garage.Value = 1 Then rs3.Fields(12) = "True" Else rs3.Fields(12) = "False" End If rs3.Fields(13) = Trim(txt_otherdescription) If opt_housetype(1).Value = True Or opt_housetype(2).Value = True Then If txt_flrno = "" Then rs3.Fields(14) = 0 Else rs3.Fields(14) = txt_flrno End If End If If chk_terrace.Value = 1 Then rs3.Fields(15) = "True" Else rs3.Fields(15) = "False" End If If chk_attic.Value = 1 Then rs3.Fields(16) = "True" Else rs3.Fields(16) = "False" End If If cmb_facingdirection.Text = "" Then cmb_facingdirection.Text = "No Direction" Else rs3.Fields(17) = cmb_facingdirection.Text End If If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from Property_master" rs4.Open rs4.AddNew rs4.Fields(0) = propertycode rs4.Fields(1) = txt_customercode rs4.Fields(2) = Trim(propertystatus) rs4.Fields(3) = "V" rs4.Fields(5) = "Maintainence"

rs4.Fields(6) = Trim(txt_propertyaddon) rs4.Fields(8) = Trim(txt_rentamount) If rs.State = 1 Then rs.Close End If rs.Source = "select * from t_property_transaction_ms" rs.Open rs.AddNew rs.Fields(0) = propertycode rs.Fields(1) = txt_propertyaddon rs.Fields(2) = "Property is Added For Maintainence" rs.Fields(5) = txt_ownername rs.Fields(6) = "V" rs1.Update rs2.Update rs3.Update rs4.Update rs.Update Exit Sub errorhandler: cn.Execute "delete from owner_contact where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_address where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_specifications where property_cd='" & propertycode & "'" cn.Execute "delete from property_master where property_no='" & propertycode & "'" cn.Execute "delete from t_property_transaction_ms where property_no='" & propertycode & "'" MsgBox " Property Master is Enquired with Some Problem", vbInformation, "Property Management" Exit Sub End Sub Private Sub option_check() If opt_housetype(0).Value = True Then If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from property_master where property_type='Bunglow'" rs4.Open If rs4.EOF = True Then propertycode = txt_propertycode & "/B1" propertystatus = "Bunglow"

Else propertycode = txt_propertycode & "/B" & rs4.RecordCount + 1 propertystatus = "Bunglow" End If Exit Sub Else If opt_housetype(1).Value = True Then If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from property_master where property_type='Flat'" rs4.Open If rs4.EOF = True Then propertycode = txt_propertycode & "/F1" propertystatus = "Flat" Else propertycode = txt_propertycode & "/F" & rs4.RecordCount + 1 propertystatus = "Flat" End If Exit Sub Else If opt_housetype(2).Value = True Then If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from property_master where property_type='Commercial'" rs4.Open If rs4.EOF = True Then propertycode = txt_propertycode & "/C1" propertystatus = "Commercial" Else propertycode = txt_propertycode & "/C" & rs4.RecordCount + 1 propertystatus = "Commercial" End If Exit Sub End If End If End If End Sub Private Sub Timer1_Timer() Me.Caption = Right(Me.Caption, Len(Me.Caption) - 1) & Left(Me.Caption, 1) End Sub

Dim propertycode As String Dim propertystatus As String Private Sub cmb_facingdirection_LostFocus() cmb_facingdirection.BackColor = &H80000005 End Sub Private Sub cmd_addpicture_Click() propcode = txt_propertycode Me.Hide frm_propertyphoto.Show 1 End Sub Private Sub Cmd_Exit_Click() Unload Me End Sub Private Sub cmd_householditem_Click() propcode = propertycode Unload Me frm_houshold.Show 1 End Sub Private Sub cmd_save_Click() If txt_ownername = "" Then MsgBox "Please Enter the Owner Name", vbInformation, "Property Management" txt_ownername.SetFocus txt_ownername.BackColor = &HC0FFFF Exit Sub Else If txt_houseno = "" Then MsgBox "Please Enter the House Number", vbInformation, "Property Management" txt_houseno.SetFocus txt_houseno.BackColor = &HC0FFFF Exit Sub Else If txt_location = "" Then MsgBox "Please Enter the Street Location", vbInformation, "Property Management" txt_location.SetFocus txt_location.BackColor = &HC0FFFF Exit Sub Else If txt_city = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_city.SetFocus txt_city.BackColor = &HC0FFFF Exit Sub

Else If txt_zipcode = "" Then MsgBox "Please Enter the Zipcode Number", vbInformation, "Property Management" txt_zipcode.SetFocus txt_zipcode.BackColor = &HC0FFFF Exit Sub Else If txt_renthouseno = "" Then MsgBox "Please Enter the House Number", vbInformation, "Property Management" txt_renthouseno.SetFocus txt_renthouseno.BackColor = &HC0FFFF Exit Sub Else If txt_rentstreet = "" Then MsgBox "Please Enter the Street Number", vbInformation, "Property Management" txt_rentstreet.SetFocus txt_rentstreet.BackColor = &HC0FFFF Exit Sub Else If txt_rentcity = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_rentcity.SetFocus txt_rentcity.BackColor = &HC0FFFF Exit Sub Else If txt_rentzip = "" Then MsgBox "Please Enter the ZipCode Number", vbInformation, "Property Management" txt_rentzip.SetFocus txt_rentzip.BackColor = &HC0FFFF Exit Sub Else If txt_rentamount = "" Then MsgBox "Please Enter the Rent Amount", vbInformation, "Property Management" txt_rentamount.SetFocus txt_rentamount.BackColor = &HC0FFFF Exit Sub Else If txt_plotsize = " X " And txt_plotsize.Visible = True Then MsgBox "Please Enter the Plot Size", vbInformation, "Property Management" txt_plotsize.SetFocus txt_plotsize.BackColor = &HC0FFFF Exit Sub Else If opt_drawing(0).Value = False And opt_drawing(1).Value = False Then MsgBox "Please Select Seperate Drawing && Dining Room Or Common Drawing && Dining Room", vbInformation, "Property Management"

opt_drawing(0).SetFocus opt_drawing(0).BackColor = &HC0FFFF Exit Sub Else If txt_builtarea = "" Then MsgBox "Please Enter the Build Area", vbInformation, "Property Management" txt_builtarea.SetFocus txt_builtarea.BackColor = &HC0FFFF Exit Sub Else If txt_toilets = "" And txt_toilets.Visible = True Then MsgBox "Please Enter the Number of Toilets", vbInformation, "Property Management" txt_toilets.SetFocus txt_toilets.BackColor = &HC0FFFF Exit Sub Else If cmb_facingdirection = "" Then MsgBox "Please Select the Facing Direction", vbInformation, "Property Management" cmb_facingdirection.SetFocus cmb_facingdirection.BackColor = &HC0FFFF Exit Sub Else If txt_bedrooms = "" And txt_bedrooms.Visible = True Then MsgBox "Please Enter the Number of Bedrooms", vbInformation, "Property Management" txt_bedrooms.SetFocus txt_bedrooms.BackColor = &HC0FFFF Exit Sub Else If txt_flrno = "" And txt_flrno.Visible = True Then MsgBox "Please Enter the Floor Number", vbInformation, "Property Management" txt_flrno.SetFocus txt_flrno.BackColor = &HC0FFFF Exit Sub End If End If End If End If End If End If End If End If End If End If End If End If

End If End If End If End If End If savedata i = MsgBox("Your Data is Successfully Saved,Would you like to add Picture and Household items", vbInformation + vbYesNo) cmd_save.Enabled = False If i = vbYes Then cmd_householditem.Enabled = True End If If i = vbNo Then Unload Me End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set rs1 = Nothing Set rs2 = Nothing Set rs3 = Nothing Set rs4 = Nothing Set cn = Nothing End Sub Private Sub opt_drawing_LostFocus(Index As Integer) ' opt_drawing(0).BackColor = &HFF8080 End Sub Private Sub opt_housetype_Click(Index As Integer) option_check If opt_housetype(2).Value = True Then Customer(20).Visible = True Customer(21).Visible = True txt_plotsize.Visible = True txt_builtarea.Visible = True chk_garage.Visible = True chk_parkspace.Visible = True cmb_facingdirection.Visible = True txt_flrno.Visible = True Customer(15).Visible = True Customer(16).Visible = True 'label.Visible = True lbl_change(31).Caption = "Floor No" lbl_change(31).Visible = True Customer(18).Visible = False Customer(23).Visible = False

txt_toilets.Visible = False txt_bedrooms.Visible = False opt_drawing(0).Visible = False opt_drawing(1).Visible = False Customer(28).Visible = False Customer(14).Visible = False Customer(32).Visible = False Customer(27).Visible = False Customer(24).Visible = False garden.Visible = False chk_attic.Visible = False chk_balcony.Visible = False chk_garden.Visible = False chk_portico.Visible = False chk_store.Visible = False chk_terrace.Visible = False chk_swim.Visible = False chk_garage.Left = 1770 chk_parkspace.Left = 1770 txt_flrno.Left = 1770 Customer(15).Left = 100 Customer(16).Left = 600 lbl_change(31).Left = 600 Exit Sub End If If opt_housetype(1).Value = True Then Customer(20).Visible = False txt_plotsize.Visible = False txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = True chk_swim.Visible = False lbl_change(31).Caption = "Floor No" chk_garden.Visible = True Customer(20).Visible = False Customer(21).Visible = True Customer(18).Visible = True

Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True Customer(27).Visible = True Customer(24).Visible = True txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6400 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 5070 Exit Sub End If If opt_housetype(0).Value = True Then Customer(20).Visible = True txt_plotsize.Visible = True txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = False chk_swim.Visible = True lbl_change(31).Caption = "Swim Pool" chk_garden.Visible = True Customer(20).Visible = True Customer(21).Visible = True Customer(18).Visible = True Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True Customer(27).Visible = True Customer(24).Visible = True

txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6090 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 5070 Exit Sub End If End Sub Private Sub txt_bedrooms_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_bedrooms_LostFocus() txt_bedrooms.BackColor = &H80000005 End Sub

Private Sub txt_builtarea_Change() opt_housetype(0).Enabled = False opt_housetype(1).Enabled = False opt_housetype(2).Enabled = False End Sub Private Sub txt_builtarea_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_builtarea_LostFocus() txt_builtarea.BackColor = &H80000005 End Sub Private Sub txt_city_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_zipcode.SetFocus End If End Sub

Private Sub txt_city_LostFocus() txt_city.BackColor = &H80000005 End Sub Private Sub Txt_Email_KeyPress(KeyAscii As Integer) KeyAscii = smallletter(KeyAscii) If KeyAscii = 13 Then txt_renthouseno.SetFocus End If End Sub Private Sub txt_faxno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_mobile.SetFocus End If End Sub Private Sub txt_flrno_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_houseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_location.SetFocus End If End Sub Private Sub txt_houseno_LostFocus() txt_houseno.BackColor = &H80000005 End Sub Private Sub txt_location_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_city.SetFocus End If End Sub Private Sub txt_location_LostFocus() txt_location.BackColor = &H80000005 End Sub Private Sub txt_mobile_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_email.SetFocus

End If End Sub Private Sub txt_otherdescription_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub Private Sub txt_ownername_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_houseno.SetFocus End If End Sub Private Sub txt_ownername_LostFocus() txt_ownername.BackColor = &H80000005 End Sub Private Sub txt_plotsize_LostFocus() txt_plotsize.BackColor = &H80000005 End Sub Private Sub txt_rentamount_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then opt_housetype(0).SetFocus End If End Sub Private Sub txt_rentamount_LostFocus() txt_rentamount.BackColor = &H80000005 End Sub Private Sub txt_rentcity_LostFocus() txt_rentcity.BackColor = &H80000005 End Sub Private Sub txt_renthouseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentstreet.SetFocus End If End Sub Private Sub txt_renthouseno_LostFocus() txt_renthouseno.BackColor = &H80000005 End Sub Private Sub txt_rentstreet_KeyPress(KeyAscii As Integer)

KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentcity.SetFocus End If End Sub Private Sub txt_rentstreet_LostFocus() txt_rentstreet.BackColor = &H80000005 End Sub Private Sub txt_renttelphoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentamount.SetFocus End If End Sub Private Sub txt_rentzip_LostFocus() txt_rentzip.BackColor = &H80000005 End Sub Private Sub txt_telephoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_faxno.SetFocus End If End Sub Private Sub txt_toilets_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_toilets_LostFocus() txt_toilets.BackColor = &H80000005 End Sub Private Sub txt_totalbedroom_LostFocus() txt_totalbedroom.BackColor = &H80000005 End Sub Private Sub Timer1_Timer() Me.Caption = Right(Me.Caption, Len(Me.Caption) - 1) & Left(Me.Caption, 1) End Sub Private Sub Form_Load() cmb_facingdirection.Text = "East" Dim SpaceNums As Integer Timer1.Interval = 70

SpaceNums = Int(Me.Width / 50) Me.Caption = "Property for Sale" & Space(SpaceNums) Timer1.Enabled = True conn rs1.Source = "select * from owner_contact" rs1.Open rs2.Source = "select * from property_address" rs2.Open rs3.Source = "select * from property_specifications" rs3.Open rs4.Source = "select * from Property_master" rs4.Open If rs1.EOF = True Then txt_customercode = "PR1" Else txt_customercode = "PR" & rs1.RecordCount + 1 End If txt_propertycode = txt_customercode txt_propertyaddon = Format(Date, "DD/mm/yyyy") option_check End Sub

Private Sub cmd_save_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cmd_exit.SetFocus Exit Sub End If End Sub Private Sub txt_rentcity_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentzip.SetFocus Exit Sub End If End Sub

Private Sub txt_renttelephoneno_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txt_rentamount.SetFocus Exit Sub End If End Sub Private Sub txt_rentzip_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_renttelphoneno.SetFocus Exit Sub End If End Sub Private Sub txt_zipcode_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_telephoneno.SetFocus Exit Sub End If End Sub Private Sub savedata() On Error GoTo errorhandler If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from owner_contact" rs1.Open If rs2.State = 1 Then rs2.Close End If rs2.Source = "select * from property_address" rs2.Open If rs3.State = 1 Then rs3.Close End If rs3.Source = "select * from property_specifications" rs3.Open

rs1.AddNew rs1.Fields(0) = txt_customercode rs1.Fields(1) = Trim(txt_ownername) rs1.Fields(2) = Trim(txt_houseno & "," & txt_location) rs1.Fields(3) = Trim(txt_city) rs1.Fields(4) = Trim(txt_zipcode) rs1.Fields(5) = Trim(txt_telephoneno) rs1.Fields(6) = Trim(txt_mobile) rs1.Fields(7) = Trim(txt_email) rs1.Fields(8) = "ACTIVE" rs1.Fields(9) = Trim(txt_faxno) rs2.AddNew rs2.Fields(0) = propertycode rs2.Fields(1) = txt_customercode rs2.Fields(2) = Trim(txt_renthouseno & "," & txt_rentstreet) rs2.Fields(3) = Trim(txt_rentstreet) rs2.Fields(4) = Trim(txt_rentcity) rs2.Fields(5) = Trim(txt_rentzip) rs2.Fields(6) = Trim(txt_renttelphoneno) rs3.AddNew rs3.Fields(0) = propertycode rs3.Fields(1) = Trim(txt_plotsize) rs3.Fields(2) = Trim(txt_builtarea) If opt_housetype(0).Value = True Or opt_housetype(1).Value = True Then rs3.Fields(3) = Trim(txt_bedrooms) rs3.Fields(4) = Trim(txt_toilets) End If If chk_swim.Value = 1 Then rs3.Fields(5) = "True" Else rs3.Fields(5) = "False" End If If opt_drawing(0).Value = True Then rs3.Fields(6) = "S" Else rs3.Fields(6) = "C" End If If chk_garage.Value = 1 Then rs3.Fields(7) = "True" Else rs3.Fields(7) = "False" End If If chk_parkspace.Value = 1 Then rs3.Fields(8) = "True"

Else rs3.Fields(8) = "False" End If If chk_balcony.Value = 1 Then rs3.Fields(9) = "True" Else rs3.Fields(9) = "False" End If If chk_store.Value = 1 Then rs3.Fields(10) = "True" Else rs3.Fields(10) = "False" End If If chk_portico.Value = 1 Then rs3.Fields(11) = "True" Else rs3.Fields(11) = "False" End If If chk_garage.Value = 1 Then rs3.Fields(12) = "True" Else rs3.Fields(12) = "False" End If rs3.Fields(13) = Trim(txt_otherdescription) If opt_housetype(1).Value = True Or opt_housetype(2).Value = True Then If txt_flrno = "" Then rs3.Fields(14) = 0 Else rs3.Fields(14) = txt_flrno End If End If If chk_terrace.Value = 1 Then rs3.Fields(15) = "True" Else rs3.Fields(15) = "False" End If If chk_attic.Value = 1 Then rs3.Fields(16) = "True" Else rs3.Fields(16) = "False" End If If cmb_facingdirection.Text = "" Then cmb_facingdirection.Text = "No Direction" Else rs3.Fields(17) = cmb_facingdirection.Text End If

If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from Property_master" rs4.Open rs4.AddNew rs4.Fields(0) = propertycode rs4.Fields(1) = txt_customercode rs4.Fields(2) = Trim(propertystatus) rs4.Fields(3) = "V" rs4.Fields(5) = "Sale" rs4.Fields(6) = Trim(txt_propertyaddon) rs4.Fields(9) = Trim(txt_rentamount) If rs.State = 1 Then rs.Close End If rs.Source = "select * from t_property_transaction_ms" rs.Open rs.AddNew rs.Fields(0) = propertycode rs.Fields(1) = txt_propertyaddon rs.Fields(2) = "Property is Added For Sale" rs.Fields(5) = txt_ownername rs.Fields(6) = "V" rs1.Update rs2.Update rs3.Update rs4.Update rs.Update Exit Sub errorhandler: cn.Execute "delete from owner_contact where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_address where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_specifications where property_cd='" & propertycode & "'" cn.Execute "delete from property_master where property_no='" & propertycode & "'" cn.Execute "delete from t_property_transaction_ms where property_no='" & propertycode & "'"

MsgBox " Property Master is Enquired with Some Problem", vbInformation, "Property Management" Exit Sub End Sub Private Sub option_check() If opt_housetype(0).Value = True Then If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from property_master where property_type='Bunglow'" rs4.Open If rs4.EOF = True Then propertycode = txt_propertycode & "/B1" propertystatus = "Bunglow" Else propertycode = txt_propertycode & "/B" & rs4.RecordCount + 1 propertystatus = "Bunglow" End If Exit Sub Else If opt_housetype(1).Value = True Then If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from property_master where property_type='Flat'" rs4.Open If rs4.EOF = True Then propertycode = txt_propertycode & "/F1" propertystatus = "Flat" Else propertycode = txt_propertycode & "/F" & rs4.RecordCount + 1 propertystatus = "Flat" End If Exit Sub Else If opt_housetype(2).Value = True Then If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from property_master where property_type='Commercial'" rs4.Open If rs4.EOF = True Then propertycode = txt_propertycode & "/C1" propertystatus = "Commercial" Else propertycode = txt_propertycode & "/C" & rs4.RecordCount + 1 propertystatus = "Commercial" End If

Exit Sub End If End If End If End Sub

Dim c Private Sub cmd_adpic_Click() ' propertycode Unload Me frm_propertyphoto.Show 1 End Sub Private Sub cmdclose_Click() c=1 Unload Me End Sub Private Sub cmdnext_Click() If des.Text = "" Then MsgBox "Please enter the descriptions", vbInformation, "Property Management" des.SetFocus Exit Sub End If If qt.Text = "" Then MsgBox "Please enter the quantity", vbInformation, "Property Management" qt.SetFocus Exit Sub End If If det.Text <> "" Then For i = 0 To det.Rows - 1 If sl.Text = det.TextMatrix(i, 0) Then det.TextMatrix(i, 1) = des.Text det.TextMatrix(i, 2) = mk.Text det.TextMatrix(i, 3) = md.Text det.TextMatrix(i, 4) = qt.Text Exit Sub End If Next End If det.AddItem sl.Text & Chr(9) & des.Text & Chr(9) & mk.Text & Chr(9) & md.Text & Chr(9) & qt.Text, c c=c+1 sl.Text = c + 1 des.Text = "" mk.Text = "" md.Text = ""

qt.Text = "" des.SetFocus cmdsave.Enabled = True End Sub Private Sub cmdsave_Click() Dim r, i 'to add new records rs.Source = "Select * from Property_Household" ' where property_code =" & "'" & prt.Caption & "'" rs.Open rs1.Source = "select * from property_fixture" rs1.Open If det.Rows <> 0 Then For i = 0 To (det.Rows - 1) rs.AddNew rs(0) = prt.Caption rs(1) = det.TextMatrix(i, 0) rs(2) = det.TextMatrix(i, 1) rs(3) = det.TextMatrix(i, 2) rs(4) = det.TextMatrix(i, 3) rs(5) = 22 'det.TextMatrix(i, 4) rs.Update Next End If If chk_fireplace.Value <> 0 Or chk_chimney.Value <> 0 Or txt_numberenterances.Text <> "" Then rs1.AddNew rs1(0) = prt.Caption If chk_fireplace.Value = 1 Then rs1(1) = "Y" Else rs1(1) = "N" End If If chk_chimney.Value = 1 Then rs1(2) = "Y" Else rs1(2) = "N" End If If txt_numberenterances.Text <> "" Then rs1(3) = txt_numberenterances.Text End If rs1.Update cmdsave.Enabled = False cmdnext.Enabled = False End If i = MsgBox("Records successfully saved! Would You Like to Add Photograph too!!!!", vbInformation + vbYesNo)

If i = vbYes Then End If If i = vbNo Then Unload Me End If

End Sub Private Sub des_Change() If Len(des.Text) > 250 Then MsgBox "Sorry you can enter maximum of 250 letters", vbInformation, "Property Management" des.Text = Left(des.Text, 250) Exit Sub End If End Sub Private Sub des_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then mk.SetFocus End If End Sub Private Sub det_DblClick() If det.Text <> "" Then sl.Text = det.TextMatrix(det.RowSel, 0) des.Text = det.TextMatrix(det.RowSel, 1) mk.Text = det.TextMatrix(det.RowSel, 2) md.Text = det.TextMatrix(det.RowSel, 3) qt.Text = det.TextMatrix(det.RowSel, 4) End If End Sub Private Sub ef_Change() If Len(ef.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" ef.Text = Left(ef.Text, 50) Exit Sub End If

End Sub Private Sub flr_Change() If Len(flr.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" flr.Text = Left(flr.Text, 50) Exit Sub End If End Sub Private Sub Form_Activate() prt.Caption = propcode sl.Text = 1 End Sub Private Sub Form_Load() If cn.State = 1 Then cn.Close End If conn Dim r, i prt.Caption = propcode sl.Text = 1 det.ColWidth(0) = 615 det.ColWidth(1) = 4335 det.ColWidth(2) = 1215 det.ColWidth(3) = 1215 det.ColWidth(4) = 750 'det.TextMatrix(0, 0) = "Item #" 'det.TextMatrix(0, 1) = " Descriptions" 'det.TextMatrix(0, 2) = " Make" 'det.TextMatrix(0, 3) = " Model" 'det.TextMatrix(0, 4) = "Quantity" End Sub Private Sub Label1_Click() End Sub Private Sub Form_Resize() ' Me.Top = ((Screen.Height - Me.Height) / 2) ' Me.Left = ((Screen.Width - Me.Width) / 2)

End Sub Private Sub Form_Unload(Cancel As Integer) 'propcode = prt.Caption Set rs = Nothing Set rs1 = Nothing Set cn = Nothing End Sub Private Sub md_Change() If Len(md.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" md.Text = Left(md.Text, 50) Exit Sub End If End Sub Private Sub md_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then qt.SetFocus End If End Sub Private Sub mk_Change() If Len(mk.Text) > 100 Then MsgBox "Sorry you can enter maximum of 100 letters", vbInformation, "Property Management" mk.Text = Left(mk.Text, 100) Exit Sub End If End Sub Private Sub mk_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then md.SetFocus End If End Sub Private Sub qt_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub

Private Sub tdor_Change() If Len(tdor.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" tdor.Text = Left(tdor.Text, 50) Exit Sub End If End Sub Private Sub twind_Change() If Len(twind.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" twind.Text = Left(twind.Text, 50) Exit Sub End If End Sub Private Sub wf_Change() If Len(wf.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" wf.Text = Left(wf.Text, 50) Exit Sub End If End Sub Private Sub txt_numberenterances_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub

Dim c Private Sub cmd_adpic_Click() propcode = prt.Caption Unload Me frm_propertyphotomodify.Show 1 End Sub Private Sub cmd_modify_Click() det.Rows = 0 cmd_modify.Enabled = False cmdnext.Enabled = True cmd_adpic.Enabled = True End Sub Private Sub cmdclose_Click() Unload Me End Sub Private Sub cmdnext_Click() If des.Text = "" Then MsgBox "Please enter the descriptions", vbInformation, "Property Management" des.SetFocus Exit Sub End If If qt.Text = "" Then MsgBox "Please enter the quantity", vbInformation, "Property Management" qt.SetFocus Exit Sub End If If det.Text <> "" Then For i = 0 To det.Rows - 1 If sl.Text = det.TextMatrix(i, 0) Then det.TextMatrix(i, 1) = des.Text det.TextMatrix(i, 2) = mk.Text det.TextMatrix(i, 3) = md.Text det.TextMatrix(i, 4) = qt.Text End If Next End If det.AddItem sl.Text & Chr(9) & des.Text & Chr(9) & mk.Text & Chr(9) & md.Text & Chr(9) & qt.Text, c c=c+1 sl.Text = c + 1

des.Text = "" mk.Text = "" md.Text = "" qt.Text = "" des.SetFocus cmdsave.Enabled = True End Sub Private Sub cmdsave_Click() Dim r, i 'to add modify records rs.Source = "Select * from Property_Household where property_code =" & "'" & propcode & "'" rs.Open rs1.Source = "select * from property_fixture where property_code =" & "'" & propcode & "'" rs1.Open If rs.RecordCount <> 0 Then rs.MoveLast r = rs.RecordCount rs.MoveFirst For i = 1 To r rs.Delete rs.MoveNext Next For i = 0 To (det.Rows - 1) rs.AddNew rs(0) = prt.Caption rs(1) = det.TextMatrix(i, 0) rs(2) = det.TextMatrix(i, 1) rs(3) = det.TextMatrix(i, 2) rs(4) = det.TextMatrix(i, 3) rs(5) = det.TextMatrix(i, 4) rs.Update Next End If If chk_fireplace.Value <> 0 Or chk_chimney.Value <> 0 Or txt_numberenterances.Text <> "" Then rs1(0) = prt.Caption If chk_fireplace.Value = 1 Then rs1(1) = "Y" Else rs1(1) = "N" End If If chk_chimney.Value = 1 Then rs1(2) = "Y" Else rs1(2) = "N"

End If If txt_numberenterances.Text <> "" Then rs1(3) = txt_numberenterances.Text End If rs1.Update rs1.Close cmdsave.Enabled = False cmdnext.Enabled = False End If i = MsgBox("Records successfully Modified! Would You Like to Add Photograph too!!!!", vbInformation + vbYesNo) If i = vbYes Then cmd_adpic.Enabled = True End If If i = vbNo Then Unload Me End If End Sub Private Sub des_Change() If Len(des.Text) > 250 Then MsgBox "Sorry you can enter maximum of 250 letters", vbInformation, "Property Management" des.Text = Left(des.Text, 250) Exit Sub End If End Sub Private Sub det_DblClick() If det.Text <> "" Then sl.Text = det.TextMatrix(det.RowSel, 0) des.Text = det.TextMatrix(det.RowSel, 1) mk.Text = det.TextMatrix(det.RowSel, 2) md.Text = det.TextMatrix(det.RowSel, 3) qt.Text = det.TextMatrix(det.RowSel, 4) End If End Sub Private Sub ef_Change() If Len(ef.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" ef.Text = Left(ef.Text, 50) Exit Sub End If

End Sub Private Sub flr_Change() If Len(flr.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" flr.Text = Left(flr.Text, 50) Exit Sub End If End Sub Private Sub Form_Activate() prt.Caption = propcode sl.Text = 1 End Sub Private Sub Form_Load() cmdnext.Enabled = False If cn.State = 1 Then cn.Close End If conn Dim r, i If rs.State = 1 Then rs.Close End If prt.Caption = propcode rs.Source = "Select * from Property_Household where property_code =" & "'" & propcode & "'" rs.Open If rs.RecordCount <> 0 Then rs.MoveLast r = rs.RecordCount rs.MoveFirst For i = 0 To r - 1 det.AddItem rs(1) & Chr(9) & rs(2) & Chr(9) & rs(3) & Chr(9) & rs(4) & Chr(9) & rs(5), i rs.MoveNext Next End If

rs.Close rs.Source = "Select * from property_fixture where property_code =" & "'" & propcode & "'" rs.Open If rs.RecordCount <> 0 Then If rs(1) = "Y" Then chk_fireplace.Value = 1 End If If rs(2) = "Y" Then chk_chimney.Value = 1 End If If rs(3) <> "" Then txt_numberenterances.Text = rs(3) End If End If rs.Close det.ColWidth(0) = 615 det.ColWidth(1) = 4335 det.ColWidth(2) = 1215 det.ColWidth(3) = 1215 det.ColWidth(4) = 750 'det.TextMatrix(0, 0) = "Item #" 'det.TextMatrix(0, 1) = " Descriptions" 'det.TextMatrix(0, 2) = " Make" 'det.TextMatrix(0, 3) = " Model" 'det.TextMatrix(0, 4) = "Quantity" cmdsave.Enabled = False End Sub Private Sub Label1_Click() End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set rs1 = Nothing Set cn = Nothing End Sub Private Sub md_Change() If Len(md.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" md.Text = Left(md.Text, 50)

Exit Sub End If End Sub Private Sub mk_Change() If Len(mk.Text) > 100 Then MsgBox "Sorry you can enter maximum of 100 letters", vbInformation, "Property Management" mk.Text = Left(mk.Text, 100) Exit Sub End If End Sub Private Sub qt_KeyPress(KeyAscii As Integer) If KeyAscii >= 65 And KeyAscii <= 121 Then KeyAscii = 0 End If End Sub Private Sub tdor_Change() If Len(tdor.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" tdor.Text = Left(tdor.Text, 50) Exit Sub End If End Sub Private Sub twind_Change() If Len(twind.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" twind.Text = Left(twind.Text, 50) Exit Sub End If End Sub Private Sub wf_Change() If Len(wf.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" wf.Text = Left(wf.Text, 50) Exit Sub End If End Sub

Dim propertystatus As String Dim tempbigcode As String Dim tempsmallcode As String Dim tempownername As String Private Sub cmb_facingdirection_LostFocus() cmb_facingdirection.BackColor = &H80000005 End Sub Private Sub cmb_propertycode_Click() Dim j As Integer Dim temp As String j = InStr(1, cmb_propertycode, "/", vbTextCompare) tempsmallcode = Mid(cmb_propertycode, 1, j - 1) tempownername = Trim(Mid(cmb_propertycode, j + 3, Len(cmb_propertycode) - j + 3)) propertystatus = Mid(cmb_propertycode, j + 1, 1) If propertystatus = "F" Then propertystatus = "Flat" Else If propertystatus = "B" Then propertystatus = "Bunglow" Else If propertystatus = "C" Then propertystatus = "Commercial" End If End If End If If rs1.State = 1 Then rs1.Close End If tempbigcode = Trim(Mid(cmb_propertycode.Text, 1, 12)) temp = "fROM Owner_Contact,Property_Master,Property_Specifications WHERE Owner_Contact.owner_code = Property_Master.owner_code AND Property_Master.property_no =Property_Specifications.property_cd AND Property_Master.property_no ='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" rs1.Source = "SELECT Owner_Contact.owner_code,Owner_Contact.Address,Owner_Contact.zipcode,Owner_C ontact.tel,Owner_Contact.Faxno,Owner_Contact.email,Owner_Contact.Mobile,Owner_C ontact.City,Property_Specifications.attic,Property_Specifications.balcony,Property_Speci fications.builtup_area,Property_Specifications.Description,Property_Specifications.facin g_direction,Property_Specifications.floor_no,Property_Specifications.garage,Property_S pecifications.garden,Property_Specifications.parking_space,Property_Specifications.plot _size,Property_Specifications.portico,Property_Specifications.property_cd,Property_Spe cifications.store,Property_Specifications.swiming_pool,Property_Specifications.terrace,P

roperty_Specifications.toilets,Property_Specifications.tot_bedrooms,Property_Specificati ons.type_draw_dinroom,property_master.property_type,property_master.ad_date,propert y_master.mainamount,property_specifications.description,property_specifications.facing _direction " & temp rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst txt_customercode = rs1.Fields(0) txt_city = rs1.Fields(7) txt_faxno = rs1.Fields(4) txt_Address = rs1.Fields(1) txt_zipcode = rs1.Fields(2) txt_mobile = rs1.Fields(6) txt_telephoneno = rs1.Fields(3) txt_email = rs1.Fields(5) txt_plotsize = rs1.Fields(17) txt_builtarea = rs1.Fields(10) If IsNull(rs1.Fields(24)) Then txt_bedrooms = "" Else txt_bedrooms = rs1.Fields(24) End If If IsNull(rs1.Fields(23)) Then txt_toilets = "" Else txt_toilets = rs1.Fields(23) End If txt_facingdirection = rs1.Fields(12) If rs1.Fields(25) = "S" Then opt_drawing(0).Value = True Else opt_drawing(1).Value = True End If If rs1.Fields(14) = "True" Then chk_garage.Value = 1 Else chk_garage.Value = 0 End If If rs1.Fields(16) = "True" Then chk_parkspace.Value = 1 Else chk_parkspace.Value = 0 End If If rs1.Fields(9) = "True" Then chk_balcony.Value = 1 Else chk_balcony.Value = 0

End If If rs1.Fields(20) = "True" Then chk_store.Value = 1 Else chk_store.Value = 0 End If If rs1.Fields(18) = "True" Then chk_portico.Value = 1 Else chk_portico.Value = 0 End If If rs1.Fields(8) = "True" Then chk_attic.Value = 1 Else chk_attic.Value = 0 End If If rs1.Fields(22) = "True" Then chk_terrace.Value = 1 Else chk_terrace.Value = 0 End If If rs1.Fields(15) = "True" Then chk_garden.Value = 1 Else chk_garden.Value = 0 End If If rs1.Fields(21) = "True" Then chk_swim.Value = 1 Else chk_swim.Value = 0 End If If IsNull(rs1.Fields(13)) Then txt_flrno = "" Else txt_flrno = rs1.Fields(13) End If txt_otherdiscription = rs1.Fields(11) End If If rs1.Fields(26) = "Bunglow" Then opt_housetype(0).Value = True opt_housetype_Click (0) Else If rs1.Fields(26) = "Flat" Then opt_housetype(1).Value = True opt_housetype_Click (1) Else If rs1.Fields(26) = "Commercial" Then

opt_housetype(2).Value = True opt_housetype_Click (2) End If End If End If txt_propertyaddon = Format(rs1.Fields(27), "mm/dd/yyyy") txt_rentamount = rs1.Fields(28) txt_otherdescription = rs1.Fields(29) cmb_facingdirection.Text = rs1.Fields(30) If rs2.State = 1 Then rs2.Close End If rs2.Source = "select * from property_address where property_code='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" rs2.Open txt_propertycode = rs2.Fields(0) txt_propertyaddress = rs2.Fields(2) txt_rentcity = rs2.Fields(4) txt_rentzip = rs2.Fields(5) txt_renttelphoneno = rs2.Fields(6) rs3.Source = "select * from property_master where property_no='" & tempbigcode & "'" rs3.Open If rs3(4) = "" Then pictname = "" MsgBox "Add pictures please", vbInformation, "Property Management" End If If rs3(4) <> "" Then pictname = rs3(4) End If rs3.Close cmd_save.Enabled = True End Sub Private Sub cmd_addpicture_Click() propcode = txt_propertycode frm_propertyphoto.Show 1 Edit = "M" Me.Hide frm_propertyphoto.Show 1 End Sub

Private Sub Cmd_Exit_Click() Unload Me End Sub Private Sub cmd_householditem_Click() propcode = txt_propertycode Unload Me frm_housholdmaintenance.Show 1 End Sub Private Sub cmd_save_Click() If txt_Address = "" Then MsgBox "Please Enter the Address", vbInformation, "Property Management" txt_Address.SetFocus txt_Address.BackColor = &HC0FFFF Exit Sub Else If txt_city = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_city.SetFocus txt_city.BackColor = &HC0FFFF Exit Sub Else If txt_zipcode = "" Then MsgBox "Please Enter the Zipcode Number", vbInformation, "Property Management" txt_zipcode.SetFocus txt_zipcode.BackColor = &HC0FFFF Exit Sub Else If txt_propertyaddress = "" Then MsgBox "Please Enter the Address", vbInformation, "Property Management" txt_propertyaddress.SetFocus txt_propertyaddress.BackColor = &HC0FFFF Exit Sub Else If txt_rentcity = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_rentcity.SetFocus txt_rentcity.BackColor = &HC0FFFF Exit Sub Else If txt_rentzip = "" Then MsgBox "Please Enter the ZipCode Number", vbInformation, "Property Management" txt_rentzip.SetFocus

txt_rentzip.BackColor = &HC0FFFF Exit Sub Else If txt_rentamount = "" Then MsgBox "Please Enter the Rent Amount", vbInformation, "Property Management" txt_rentamount.SetFocus txt_rentamount.BackColor = &HC0FFFF Exit Sub Else If txt_plotsize = " X " And txt_plotsize.Visible = True Then MsgBox "Please Enter the Plot Size", vbInformation, "Property Management" txt_plotsize.SetFocus txt_plotsize.BackColor = &HC0FFFF Exit Sub Else If opt_drawing(0).Value = False And opt_drawing(1).Value = False Then MsgBox "Please Select Seperate Drawing && Dining Room Or Common Drawing && Dining Room", vbInformation, "Property Management" opt_drawing(0).SetFocus opt_drawing(0).BackColor = &HC0FFFF Exit Sub Else If txt_builtarea = "" Then MsgBox "Please Enter the Build Area", vbInformation, "Property Management" txt_builtarea.SetFocus txt_builtarea.BackColor = &HC0FFFF Exit Sub Else If txt_toilets = "" And txt_toilets.Visible = True Then MsgBox "Please Enter the Number of Toilets", vbInformation, "Property Management" txt_toilets.SetFocus txt_toilets.BackColor = &HC0FFFF Exit Sub Else If cmb_facingdirection = "" Then MsgBox "Please Select the Facing Direction", vbInformation, "Property Management" cmb_facingdirection.SetFocus cmb_facingdirection.BackColor = &HC0FFFF Exit Sub Else If txt_bedrooms = "" And txt_bedrooms.Visible = True Then MsgBox "Please Enter the Number of Bedrooms", vbInformation, "Property Management" txt_bedrooms.SetFocus txt_bedrooms.BackColor = &HC0FFFF

Exit Sub Else If txt_flrno = "" And txt_flrno.Visible = True Then MsgBox "Please Enter the Floor Number", vbInformation, "Property Management" txt_flrno.SetFocus txt_flrno.BackColor = &HC0FFFF Exit Sub End If End If End If End If End If End If End If End If End If End If End If End If End If End If Dim j As Integer j = InStr(1, cmb_propertycode, "/", vbTextCompare) cn.Execute "delete from property_master where property_no='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" cn.Execute "delete from owner_contact where owner_code='" & Mid(cmb_propertycode, 1, j - 1) & "'" cn.Execute "delete from property_address where property_code='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" cn.Execute "delete from property_specifications where property_cd='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" savedata i = MsgBox("Your Data is Successfully Saved,Would you like to add Picture and Household items", vbInformation + vbYesNo) If i = vbYes Then cmd_householditem.Enabled = True ' cmd_addpicture.Enabled = True ' Me.Hide End If If i = vbNo Then Unload Me End If End Sub Private Sub Form_Unload(Cancel As Integer)

Set rs = Nothing Set rs1 = Nothing Set rs2 = Nothing Set rs3 = Nothing Set rs4 = Nothing Set cn = Nothing End Sub Private Sub opt_drawing_LostFocus(Index As Integer) ' opt_drawing(0).BackColor = &HFF8080 End Sub Private Sub opt_housetype_Click(Index As Integer) 'option_check If opt_housetype(2).Value = True Then Customer(20).Visible = True Customer(21).Visible = True txt_plotsize.Visible = True txt_builtarea.Visible = True chk_garage.Visible = True chk_parkspace.Visible = True cmb_facingdirection.Visible = True txt_flrno.Visible = True Customer(15).Visible = True Customer(16).Visible = True 'label.Visible = True lbl_change(31).Caption = "Floor No" lbl_change(31).Visible = True Customer(18).Visible = False Customer(23).Visible = False txt_toilets.Visible = False txt_bedrooms.Visible = False opt_drawing(0).Visible = False opt_drawing(1).Visible = False Customer(28).Visible = False Customer(14).Visible = False Customer(32).Visible = False Customer(27).Visible = False Customer(24).Visible = False garden.Visible = False chk_attic.Visible = False chk_balcony.Visible = False chk_garden.Visible = False chk_portico.Visible = False chk_store.Visible = False chk_terrace.Visible = False chk_swim.Visible = False chk_garage.Left = 1770

chk_parkspace.Left = 1770 txt_flrno.Left = 1770 Customer(15).Left = 600 Customer(16).Left = 600 lbl_change(31).Left = 600 Exit Sub End If If opt_housetype(1).Value = True Then Customer(20).Visible = False txt_plotsize.Visible = False txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = True chk_swim.Visible = False lbl_change(31).Caption = "Floor No" chk_garden.Visible = True Customer(20).Visible = False Customer(21).Visible = True Customer(18).Visible = True Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True Customer(27).Visible = True Customer(24).Visible = True txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6090 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 5100 Exit Sub End If

If opt_housetype(0).Value = True Then Customer(20).Visible = True txt_plotsize.Visible = True txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = False chk_swim.Visible = True lbl_change(31).Caption = "Swim Pool" chk_garden.Visible = True Customer(20).Visible = True Customer(21).Visible = True Customer(18).Visible = True Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True Customer(27).Visible = True Customer(24).Visible = True txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6090 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 4935 Exit Sub End If End Sub Private Sub Txt_Address_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_city.SetFocus

End If End Sub Private Sub txt_bedrooms_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_bedrooms_LostFocus() txt_bedrooms.BackColor = &H80000005 End Sub Private Sub txt_builtarea_Change() opt_housetype(0).Enabled = False opt_housetype(1).Enabled = False opt_housetype(2).Enabled = False End Sub Private Sub txt_builtarea_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_builtarea_LostFocus() txt_builtarea.BackColor = &H80000005 End Sub Private Sub txt_city_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_zipcode.SetFocus End If End Sub Private Sub txt_city_LostFocus() txt_city.BackColor = &H80000005 End Sub Private Sub Txt_Email_KeyPress(KeyAscii As Integer) KeyAscii = smallletter(KeyAscii) If KeyAscii = 13 Then txt_propertyaddress.SetFocus End If End Sub Private Sub txt_faxno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_mobile.SetFocus

End If End Sub Private Sub txt_houseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_location.SetFocus End If End Sub Private Sub txt_houseno_LostFocus() txt_houseno.BackColor = &H80000005 End Sub Private Sub txt_location_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_city.SetFocus End If End Sub Private Sub txt_location_LostFocus() txt_location.BackColor = &H80000005 End Sub Private Sub txt_flrno_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_mobile_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_email.SetFocus End If End Sub Private Sub txt_otherdescription_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub

Private Sub txt_ownername_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_houseno.SetFocus End If End Sub

Private Sub txt_ownername_LostFocus() txt_ownername.BackColor = &H80000005 End Sub Private Sub txt_plotsize_LostFocus() txt_plotsize.BackColor = &H80000005 End Sub Private Sub txt_propertyaddress_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentcity.SetFocus End If End Sub Private Sub txt_rentamount_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then opt_housetype(0).SetFocus End If End Sub Private Sub txt_rentamount_LostFocus() txt_rentamount.BackColor = &H80000005 End Sub Private Sub txt_rentcity_LostFocus() txt_rentcity.BackColor = &H80000005 End Sub Private Sub txt_renthouseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentstreet.SetFocus End If End Sub Private Sub txt_renthouseno_LostFocus() txt_renthouseno.BackColor = &H80000005 End Sub Private Sub txt_rentstreet_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentcity.SetFocus End If

End Sub Private Sub txt_rentstreet_LostFocus() txt_rentstreet.BackColor = &H80000005 End Sub Private Sub txt_renttelphoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub Private Sub txt_rentzip_LostFocus() txt_rentzip.BackColor = &H80000005 End Sub Private Sub txt_telephoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_faxno.SetFocus End If End Sub Private Sub txt_toilets_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_toilets_LostFocus() txt_toilets.BackColor = &H80000005 End Sub Private Sub txt_totalbedroom_LostFocus() txt_totalbedroom.BackColor = &H80000005 End Sub Private Sub Timer1_Timer() Me.Caption = Right(Me.Caption, Len(Me.Caption) - 1) & Left(Me.Caption, 1) End Sub Private Sub Form_Load() Dim SpaceNums As Integer Timer1.Interval = 70 SpaceNums = Int(Me.Width / 50) Me.Caption = "Property for Rent" & Space(SpaceNums) Timer1.Enabled = True conn

rs1.Source = "SELECT Owner_Contact.Name, Property_Master.property_no From Property_Master, Owner_Contact WHERE Property_Master.owner_code = Owner_Contact.owner_code and Property_Master.property_nature='Maintainence'" rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst While rs1.EOF = False cmb_propertycode.AddItem rs1.Fields(1) & " rs1.MoveNext Wend End If End Sub Private Sub cmd_save_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cmd_exit.SetFocus Exit Sub End If End Sub Private Sub txt_rentcity_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentzip.SetFocus Exit Sub End If End Sub Private Sub txt_renttelephoneno_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txt_rentamount.SetFocus Exit Sub End If End Sub Private Sub txt_rentzip_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_renttelphoneno.SetFocus Exit Sub End If End Sub

" & rs1.Fields(0)

Private Sub txt_zipcode_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_telephoneno.SetFocus Exit Sub End If End Sub Private Sub savedata() On Error GoTo errorhandler If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from owner_contact" rs1.Open If rs2.State = 1 Then rs2.Close End If rs2.Source = "select * from property_address" rs2.Open If rs3.State = 1 Then rs3.Close End If rs3.Source = "select * from property_specifications" rs3.Open rs1.AddNew rs1.Fields(0) = Trim(tempsmallcode) rs1.Fields(1) = Trim(tempownername) rs1.Fields(2) = Trim(txt_Address) rs1.Fields(3) = Trim(txt_city) rs1.Fields(4) = Trim(txt_zipcode) rs1.Fields(5) = Trim(txt_telephoneno) rs1.Fields(6) = Trim(txt_mobile) rs1.Fields(7) = Trim(txt_email) rs1.Fields(8) = "ACTIVE" rs1.Fields(9) = Trim(txt_faxno) rs2.AddNew rs2.Fields(0) = Trim(tempbigcode) rs2.Fields(1) = Trim(tempsmallcode) rs2.Fields(2) = Trim(txt_propertyaddress) rs2.Fields(3) = Trim(txt_rentstreet) rs2.Fields(4) = Trim(txt_rentcity) rs2.Fields(5) = Trim(txt_rentzip)

rs2.Fields(6) = Trim(txt_renttelphoneno) rs3.AddNew rs3.Fields(0) = Trim(tempbigcode) rs3.Fields(1) = Trim(txt_plotsize) rs3.Fields(2) = Trim(txt_builtarea) If opt_housetype(0).Value = True Or opt_housetype(1).Value = True Then rs3.Fields(3) = Trim(txt_bedrooms) rs3.Fields(4) = Trim(txt_toilets) End If If chk_swim.Value = 1 Then rs3.Fields(5) = "True" Else rs3.Fields(5) = "False" End If If opt_drawing(0).Value = True Then rs3.Fields(6) = "S" Else rs3.Fields(6) = "C" End If If chk_garage.Value = 1 Then rs3.Fields(7) = "True" Else rs3.Fields(7) = "False" End If If chk_parkspace.Value = 1 Then rs3.Fields(8) = "True" Else rs3.Fields(8) = "False" End If If chk_balcony.Value = 1 Then rs3.Fields(9) = "True" Else rs3.Fields(9) = "False" End If If chk_store.Value = 1 Then rs3.Fields(10) = "True" Else rs3.Fields(10) = "False" End If If chk_portico.Value = 1 Then rs3.Fields(11) = "True" Else rs3.Fields(11) = "False" End If If chk_garage.Value = 1 Then rs3.Fields(12) = "True" Else

rs3.Fields(12) = "False" End If rs3.Fields(13) = Trim(txt_otherdescription) If opt_housetype(1).Value = True Or opt_housetype(2).Value = True Then If txt_flrno = "" Then rs3.Fields(14) = 0 Else rs3.Fields(14) = txt_flrno End If End If If chk_terrace.Value = 1 Then rs3.Fields(15) = "True" Else rs3.Fields(15) = "False" End If If chk_attic.Value = 1 Then rs3.Fields(16) = "True" Else rs3.Fields(16) = "False" End If If cmb_facingdirection.Text = "" Then cmb_facingdirection.Text = "No Direction" Else rs3.Fields(17) = cmb_facingdirection.Text End If If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from Property_master" rs4.Open rs4.AddNew rs4.Fields(0) = Trim(tempbigcode) rs4.Fields(1) = Trim(tempsmallcode) rs4.Fields(2) = Trim(propertystatus) rs4.Fields(3) = "V" rs4.Fields(4) = " " & pictname rs4.Fields(5) = "Maintainence" rs4.Fields(6) = Trim(txt_propertyaddon) rs4.Fields(8) = Trim(txt_rentamount) rs1.Update rs2.Update rs3.Update rs4.Update Exit Sub

errorhandler: cn.Execute "delete from owner_contact where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_address where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_specifications where property_cd='" & propertycode & "'" cn.Execute "delete from property_master where property_no='" & propertycode & "'" MsgBox " Property Master is Enquired with Some Problem", vbInformation, "Property Management" Exit Sub End Sub 'Private Sub option_check() ' ' If opt_housetype(0).Value = True Then ' If rs4.State = 1 Then ' rs4.Close ' End If ' rs4.Source = "select * from property_master where property_type='Bunglow'" ' rs4.Open ' If rs4.EOF = True Then ' propertycode = txt_propertycode & "/B1" ' propertystatus = "Bunglow" ' Else ' propertycode = txt_propertycode & "/B" & rs4.RecordCount + 1 ' propertystatus = "Bunglow" ' End If ' Exit Sub ' Else ' If opt_housetype(1).Value = True Then ' If rs4.State = 1 Then ' rs4.Close ' End If ' rs4.Source = "select * from property_master where property_type='Flat'" ' rs4.Open ' If rs4.EOF = True Then ' propertycode = txt_propertycode & "/F1" ' propertystatus = "Flat" ' Else ' propertycode = txt_propertycode & "/F" & rs4.RecordCount + 1 ' propertystatus = "Flat" ' End If ' Exit Sub ' Else ' If opt_housetype(2).Value = True Then ' If rs4.State = 1 Then

' rs4.Close ' End If ' rs4.Source = "select * from property_master where property_type='Commercial'" ' rs4.Open ' If rs4.EOF = True Then ' propertycode = txt_propertycode & "/C1" ' propertystatus = "Commercial" ' Else ' propertycode = txt_propertycode & "/C" & rs4.RecordCount + 1 ' propertystatus = "Commercial" ' End If ' Exit Sub ' End If ' End If ' End If 'End Sub '

Dim propertystatus As String Dim tempbigcode As String Dim tempsmallcode As String Dim tempownername As String Private Sub cmb_facingdirection_LostFocus() cmb_facingdirection.BackColor = &H80000005 End Sub Private Sub cmb_propertycode_Click() Dim j As Integer Dim temp As String j = InStr(1, cmb_propertycode, "/", vbTextCompare) tempsmallcode = Mid(cmb_propertycode, 1, j - 1) tempownername = Trim(Mid(cmb_propertycode, j + 3, Len(cmb_propertycode) - j + 3)) propertystatus = Mid(cmb_propertycode, j + 1, 1) If propertystatus = "F" Then propertystatus = "Flat" Else If propertystatus = "B" Then propertystatus = "Bunglow" Else If propertystatus = "C" Then propertystatus = "Commercial" End If End If End If If rs1.State = 1 Then rs1.Close End If tempbigcode = Trim(Mid(cmb_propertycode.Text, 1, 12)) temp = "fROM Owner_Contact,Property_Master,Property_Specifications WHERE Owner_Contact.owner_code = Property_Master.owner_code AND Property_Master.property_no =Property_Specifications.property_cd AND Property_Master.property_no ='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" rs1.Source = "SELECT Owner_Contact.owner_code,Owner_Contact.Address,Owner_Contact.zipcode,Owner_C ontact.tel,Owner_Contact.Faxno,Owner_Contact.email,Owner_Contact.Mobile,Owner_C ontact.City,Property_Specifications.attic,Property_Specifications.balcony,Property_Speci fications.builtup_area,Property_Specifications.Description,Property_Specifications.facin g_direction,Property_Specifications.floor_no,Property_Specifications.garage,Property_S pecifications.garden,Property_Specifications.parking_space,Property_Specifications.plot _size,Property_Specifications.portico,Property_Specifications.property_cd,Property_Spe cifications.store,Property_Specifications.swiming_pool,Property_Specifications.terrace,P

roperty_Specifications.toilets,Property_Specifications.tot_bedrooms,Property_Specificati ons.type_draw_dinroom,property_master.property_type,property_master.ad_date,propert y_master.rentamount,property_specifications.description,property_specifications.facing_ direction " & temp rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst txt_customercode = rs1.Fields(0) txt_city = rs1.Fields(7) txt_faxno = rs1.Fields(4) txt_Address = rs1.Fields(1) txt_zipcode = rs1.Fields(2) txt_mobile = rs1.Fields(6) txt_telephoneno = rs1.Fields(3) txt_email = rs1.Fields(5) txt_plotsize = rs1.Fields(17) txt_builtarea = rs1.Fields(10) If IsNull(rs1.Fields(24)) Then txt_bedrooms = "" Else txt_bedrooms = rs1.Fields(24) End If If IsNull(rs1.Fields(23)) Then txt_toilets = "" Else txt_toilets = rs1.Fields(23) End If txt_facingdirection = rs1.Fields(12) If rs1.Fields(25) = "S" Then opt_drawing(0).Value = True Else opt_drawing(1).Value = True End If If rs1.Fields(14) = "True" Then chk_garage.Value = 1 Else chk_garage.Value = 0 End If If rs1.Fields(16) = "True" Then chk_parkspace.Value = 1 Else chk_parkspace.Value = 0 End If If rs1.Fields(9) = "True" Then chk_balcony.Value = 1 Else chk_balcony.Value = 0

End If If rs1.Fields(20) = "True" Then chk_store.Value = 1 Else chk_store.Value = 0 End If If rs1.Fields(18) = "True" Then chk_portico.Value = 1 Else chk_portico.Value = 0 End If If rs1.Fields(8) = "True" Then chk_attic.Value = 1 Else chk_attic.Value = 0 End If If rs1.Fields(22) = "True" Then chk_terrace.Value = 1 Else chk_terrace.Value = 0 End If If rs1.Fields(15) = "True" Then chk_garden.Value = 1 Else chk_garden.Value = 0 End If If rs1.Fields(21) = "True" Then chk_swim.Value = 1 Else chk_swim.Value = 0 End If If IsNull(rs1.Fields(13)) Then txt_flrno = "" Else txt_flrno = rs1.Fields(13) End If txt_otherdiscription = rs1.Fields(11) End If If rs1.Fields(26) = "Bunglow" Then opt_housetype(0).Value = True opt_housetype_Click (0) Else If rs1.Fields(26) = "Flat" Then opt_housetype(1).Value = True opt_housetype_Click (1) Else If rs1.Fields(26) = "Commercial" Then

opt_housetype(2).Value = True opt_housetype_Click (2) End If End If End If txt_propertyaddon = Format(rs1.Fields(27), "mm/dd/yyyy") txt_rentamount = rs1.Fields(28) txt_otherdescription = rs1.Fields(29) cmb_facingdirection.Text = rs1.Fields(30) If rs2.State = 1 Then rs2.Close End If rs2.Source = "select * from property_address where property_code='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" rs2.Open txt_propertycode = rs2.Fields(0) txt_propertyaddress = rs2.Fields(2) txt_rentcity = rs2.Fields(4) txt_rentzip = rs2.Fields(5) txt_renttelphoneno = rs2.Fields(6) If rs3.State = 1 Then rs3.Close End If rs3.Source = "select * from property_master where property_no='" & tempbigcode & "'" rs3.Open If rs3(4) = "" Then pictname = "" MsgBox "Add pictures please", vbInformation, "Property Management" End If If rs3(4) <> "" Then pictname = rs3(4) End If rs3.Close cmd_save.Enabled = True End Sub Private Sub cmd_addpicture_Click() propcode = txt_propertycode Edit = "M" Me.Hide frm_propertyphoto.Show 1 End Sub Private Sub Cmd_Exit_Click() Unload Me

End Sub Private Sub cmd_householditem_Click() propcode = txt_propertycode Unload Me frm_housholdmaintenance.Show 1 End Sub Private Sub cmd_save_Click() If txt_Address = "" Then MsgBox "Please Enter the Address", vbInformation, "Property Management" txt_Address.SetFocus txt_Address.BackColor = &HC0FFFF Exit Sub Else If txt_city = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_city.SetFocus txt_city.BackColor = &HC0FFFF Exit Sub Else If txt_zipcode = "" Then MsgBox "Please Enter the Zipcode Number", vbInformation, "Property Management" txt_zipcode.SetFocus txt_zipcode.BackColor = &HC0FFFF Exit Sub Else If txt_propertyaddress = "" Then MsgBox "Please Enter the Address", vbInformation, "Property Management" txt_propertyaddress.SetFocus txt_propertyaddress.BackColor = &HC0FFFF Exit Sub Else If txt_rentcity = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_rentcity.SetFocus txt_rentcity.BackColor = &HC0FFFF Exit Sub Else If txt_rentzip = "" Then MsgBox "Please Enter the ZipCode Number", vbInformation, "Property Management" txt_rentzip.SetFocus txt_rentzip.BackColor = &HC0FFFF Exit Sub Else

If txt_rentamount = "" Then MsgBox "Please Enter the Rent Amount", vbInformation, "Property Management" txt_rentamount.SetFocus txt_rentamount.BackColor = &HC0FFFF Exit Sub Else If txt_plotsize = " X " And txt_plotsize.Visible = True Then MsgBox "Please Enter the Plot Size", vbInformation, "Property Management" txt_plotsize.SetFocus txt_plotsize.BackColor = &HC0FFFF Exit Sub Else If opt_drawing(0).Value = False And opt_drawing(1).Value = False Then MsgBox "Please Select Seperate Drawing && Dining Room Or Common Drawing && Dining Room", vbInformation, "Property Management" opt_drawing(0).SetFocus opt_drawing(0).BackColor = &HC0FFFF Exit Sub Else If txt_builtarea = "" Then MsgBox "Please Enter the Build Area", vbInformation, "Property Management" txt_builtarea.SetFocus txt_builtarea.BackColor = &HC0FFFF Exit Sub Else If txt_toilets = "" And txt_toilets.Visible = True Then MsgBox "Please Enter the Number of Toilets", vbInformation, "Property Management" txt_toilets.SetFocus txt_toilets.BackColor = &HC0FFFF Exit Sub Else If cmb_facingdirection = "" Then MsgBox "Please Select the Facing Direction", vbInformation, "Property Management" cmb_facingdirection.SetFocus cmb_facingdirection.BackColor = &HC0FFFF Exit Sub Else If txt_bedrooms = "" And txt_bedrooms.Visible = True Then MsgBox "Please Enter the Number of Bedrooms", vbInformation, "Property Management" txt_bedrooms.SetFocus txt_bedrooms.BackColor = &HC0FFFF Exit Sub Else If txt_flrno = "" And txt_flrno.Visible = True Then

MsgBox "Please Enter the Floor Number", vbInformation, "Property Management" txt_flrno.SetFocus txt_flrno.BackColor = &HC0FFFF Exit Sub End If End If End If End If End If End If End If End If End If End If End If End If End If End If Dim j As Integer j = InStr(1, cmb_propertycode, "/", vbTextCompare) cn.Execute "delete from property_master where property_no='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" cn.Execute "delete from owner_contact where owner_code='" & Mid(cmb_propertycode, 1, j - 1) & "'" cn.Execute "delete from property_address where property_code='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" cn.Execute "delete from property_specifications where property_cd='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" savedata i = MsgBox("Your Data is Successfully Modified,Would you like to add Picture and Household items", vbInformation + vbYesNo) cmd_save.Enabled = False If i = vbYes Then cmd_householditem.Enabled = True End If If i = vbNo Then Unload Me End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set rs1 = Nothing Set rs2 = Nothing

Set rs3 = Nothing Set rs4 = Nothing Set cn = Nothing End Sub Private Sub opt_drawing_LostFocus(Index As Integer) 'opt_drawing(0).BackColor = &HFF8080 End Sub Private Sub opt_housetype_Click(Index As Integer) 'option_check If opt_housetype(2).Value = True Then Customer(20).Visible = True Customer(21).Visible = True txt_plotsize.Visible = True txt_builtarea.Visible = True chk_garage.Visible = True chk_parkspace.Visible = True cmb_facingdirection.Visible = True txt_flrno.Visible = True Customer(15).Visible = True Customer(16).Visible = True 'label.Visible = True lbl_change(31).Caption = "Floor No" lbl_change(31).Visible = True Customer(18).Visible = False Customer(23).Visible = False txt_toilets.Visible = False txt_bedrooms.Visible = False opt_drawing(0).Visible = False opt_drawing(1).Visible = False Customer(28).Visible = False Customer(14).Visible = False Customer(32).Visible = False Customer(27).Visible = False Customer(24).Visible = False garden.Visible = False chk_attic.Visible = False chk_balcony.Visible = False chk_garden.Visible = False chk_portico.Visible = False chk_store.Visible = False chk_terrace.Visible = False chk_swim.Visible = False chk_garage.Left = 1770 chk_parkspace.Left = 1770 txt_flrno.Left = 1770 Customer(15).Left = 600

Customer(16).Left = 600 lbl_change(31).Left = 600 Exit Sub End If If opt_housetype(1).Value = True Then Customer(20).Visible = False txt_plotsize.Visible = False txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = True chk_swim.Visible = False lbl_change(31).Caption = "Floor No" chk_garden.Visible = True Customer(20).Visible = False Customer(21).Visible = True Customer(18).Visible = True Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True Customer(27).Visible = True Customer(24).Visible = True txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6090 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 5100 Exit Sub End If If opt_housetype(0).Value = True Then Customer(20).Visible = True txt_plotsize.Visible = True

txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = False chk_swim.Visible = True lbl_change(31).Caption = "Swim Pool" chk_garden.Visible = True Customer(20).Visible = True Customer(21).Visible = True Customer(18).Visible = True Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True Customer(27).Visible = True Customer(24).Visible = True txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6090 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 4935 Exit Sub End If End Sub Private Sub Txt_Address_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_city.SetFocus End If End Sub

Private Sub txt_bedrooms_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_bedrooms_LostFocus() txt_bedrooms.BackColor = &H80000005 End Sub Private Sub txt_builtarea_Change() opt_housetype(0).Enabled = False opt_housetype(1).Enabled = False opt_housetype(2).Enabled = False End Sub Private Sub txt_builtarea_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_builtarea_LostFocus() txt_builtarea.BackColor = &H80000005 End Sub Private Sub txt_city_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_zipcode.SetFocus End If End Sub Private Sub txt_city_LostFocus() txt_city.BackColor = &H80000005 End Sub Private Sub Txt_Email_KeyPress(KeyAscii As Integer) KeyAscii = smallletter(KeyAscii) If KeyAscii = 13 Then txt_propertyaddress.SetFocus End If End Sub Private Sub txt_faxno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_mobile.SetFocus End If End Sub

Private Sub txt_houseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_location.SetFocus End If End Sub Private Sub txt_houseno_LostFocus() txt_houseno.BackColor = &H80000005 End Sub Private Sub txt_location_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_city.SetFocus End If End Sub Private Sub txt_location_LostFocus() txt_location.BackColor = &H80000005 End Sub Private Sub txt_flrno_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_mobile_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_email.SetFocus End If End Sub Private Sub txt_otherdescription_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub

Private Sub txt_ownername_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_houseno.SetFocus End If End Sub Private Sub txt_ownername_LostFocus() txt_ownername.BackColor = &H80000005

End Sub Private Sub txt_plotsize_LostFocus() txt_plotsize.BackColor = &H80000005 End Sub Private Sub txt_propertyaddress_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentcity.SetFocus End If End Sub Private Sub txt_rentamount_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then opt_housetype(0).SetFocus End If End Sub Private Sub txt_rentamount_LostFocus() txt_rentamount.BackColor = &H80000005 End Sub Private Sub txt_rentcity_LostFocus() txt_rentcity.BackColor = &H80000005 End Sub Private Sub txt_renthouseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentstreet.SetFocus End If End Sub Private Sub txt_renthouseno_LostFocus() txt_renthouseno.BackColor = &H80000005 End Sub Private Sub txt_rentstreet_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentcity.SetFocus End If End Sub Private Sub txt_rentstreet_LostFocus() txt_rentstreet.BackColor = &H80000005

End Sub Private Sub txt_renttelphoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub Private Sub txt_rentzip_LostFocus() txt_rentzip.BackColor = &H80000005 End Sub Private Sub txt_telephoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_faxno.SetFocus End If End Sub Private Sub txt_toilets_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_toilets_LostFocus() txt_toilets.BackColor = &H80000005 End Sub Private Sub txt_totalbedroom_LostFocus() txt_totalbedroom.BackColor = &H80000005 End Sub Private Sub Timer1_Timer() Me.Caption = Right(Me.Caption, Len(Me.Caption) - 1) & Left(Me.Caption, 1) End Sub Private Sub Form_Load() Dim SpaceNums As Integer Timer1.Interval = 70 SpaceNums = Int(Me.Width / 50) Me.Caption = "Property for Rent" & Space(SpaceNums) Timer1.Enabled = True conn rs1.Source = "SELECT Owner_Contact.Name, Property_Master.property_no From Property_Master, Owner_Contact WHERE Property_Master.owner_code = Owner_Contact.owner_code and Property_Master.property_nature='Rent'" rs1.Open

If rs1.EOF = True Then Else rs1.MoveFirst While rs1.EOF = False cmb_propertycode.AddItem rs1.Fields(1) & " rs1.MoveNext Wend End If End Sub Private Sub cmd_save_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cmd_exit.SetFocus Exit Sub End If End Sub

" & rs1.Fields(0)

Private Sub txt_rentcity_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentzip.SetFocus Exit Sub End If End Sub Private Sub txt_renttelephoneno_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txt_rentamount.SetFocus Exit Sub End If End Sub Private Sub txt_rentzip_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_renttelphoneno.SetFocus Exit Sub End If End Sub Private Sub txt_zipcode_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then

txt_telephoneno.SetFocus Exit Sub End If End Sub Private Sub savedata() On Error GoTo errorhandler If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from owner_contact" rs1.Open If rs2.State = 1 Then rs2.Close End If rs2.Source = "select * from property_address" rs2.Open If rs3.State = 1 Then rs3.Close End If rs3.Source = "select * from property_specifications" rs3.Open rs1.AddNew rs1.Fields(0) = Trim(tempsmallcode) rs1.Fields(1) = Trim(tempownername) rs1.Fields(2) = Trim(txt_Address) rs1.Fields(3) = Trim(txt_city) rs1.Fields(4) = Trim(txt_zipcode) rs1.Fields(5) = Trim(txt_telephoneno) rs1.Fields(6) = Trim(txt_mobile) rs1.Fields(7) = Trim(txt_email) rs1.Fields(8) = "ACTIVE" rs1.Fields(9) = Trim(txt_faxno) rs2.AddNew rs2.Fields(0) = Trim(tempbigcode) rs2.Fields(1) = Trim(tempsmallcode) rs2.Fields(2) = Trim(txt_propertyaddress) rs2.Fields(3) = Trim(txt_rentstreet) rs2.Fields(4) = Trim(txt_rentcity) rs2.Fields(5) = Trim(txt_rentzip) rs2.Fields(6) = Trim(txt_renttelphoneno) rs3.AddNew

rs3.Fields(0) = Trim(tempbigcode) rs3.Fields(1) = Trim(txt_plotsize) rs3.Fields(2) = Trim(txt_builtarea) If opt_housetype(0).Value = True Or opt_housetype(1).Value = True Then rs3.Fields(3) = Trim(txt_bedrooms) rs3.Fields(4) = Trim(txt_toilets) End If If chk_swim.Value = 1 Then rs3.Fields(5) = "True" Else rs3.Fields(5) = "False" End If If opt_drawing(0).Value = True Then rs3.Fields(6) = "S" Else rs3.Fields(6) = "C" End If If chk_garage.Value = 1 Then rs3.Fields(7) = "True" Else rs3.Fields(7) = "False" End If If chk_parkspace.Value = 1 Then rs3.Fields(8) = "True" Else rs3.Fields(8) = "False" End If If chk_balcony.Value = 1 Then rs3.Fields(9) = "True" Else rs3.Fields(9) = "False" End If If chk_store.Value = 1 Then rs3.Fields(10) = "True" Else rs3.Fields(10) = "False" End If If chk_portico.Value = 1 Then rs3.Fields(11) = "True" Else rs3.Fields(11) = "False" End If If chk_garage.Value = 1 Then rs3.Fields(12) = "True" Else rs3.Fields(12) = "False" End If rs3.Fields(13) = Trim(txt_otherdescription)

If opt_housetype(1).Value = True Or opt_housetype(2).Value = True Then If txt_flrno = "" Then rs3.Fields(14) = 0 Else rs3.Fields(14) = txt_flrno End If End If If chk_terrace.Value = 1 Then rs3.Fields(15) = "True" Else rs3.Fields(15) = "False" End If If chk_attic.Value = 1 Then rs3.Fields(16) = "True" Else rs3.Fields(16) = "False" End If If cmb_facingdirection.Text = "" Then cmb_facingdirection.Text = "No Direction" Else rs3.Fields(17) = cmb_facingdirection.Text End If If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from Property_master" rs4.Open rs4.AddNew rs4.Fields(0) = Trim(tempbigcode) rs4.Fields(1) = Trim(tempsmallcode) rs4.Fields(2) = Trim(propertystatus) rs4.Fields(3) = "V" rs4.Fields(4) = " " & pictname rs4.Fields(5) = "Rent" rs4.Fields(6) = Trim(txt_propertyaddon) rs4.Fields(7) = Trim(txt_rentamount) rs1.Update rs2.Update rs3.Update rs4.Update Exit Sub errorhandler:

cn.Execute "delete from owner_contact where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_address where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_specifications where property_cd='" & propertycode & "'" cn.Execute "delete from property_master where property_no='" & propertycode & "'" MsgBox " Property Master is Enquired with Some Problem", vbInformation, "Property Management" Exit Sub End Sub

Dim propertystatus As String Dim tempbigcode As String Dim tempsmallcode As String Dim tempownername As String Private Sub cmb_facingdirection_LostFocus() cmb_facingdirection.BackColor = &H80000005 End Sub Private Sub cmb_propertycode_Click() Dim j As Integer Dim temp As String j = InStr(1, cmb_propertycode, "/", vbTextCompare) tempsmallcode = Mid(cmb_propertycode, 1, j - 1) tempownername = Trim(Mid(cmb_propertycode, j + 3, Len(cmb_propertycode) - j + 3)) propertystatus = Mid(cmb_propertycode, j + 1, 1) If propertystatus = "F" Then propertystatus = "Flat" Else If propertystatus = "B" Then propertystatus = "Bunglow" Else If propertystatus = "C" Then propertystatus = "Commercial" End If End If End If If rs1.State = 1 Then rs1.Close End If tempbigcode = Trim(Mid(cmb_propertycode.Text, 1, 12)) temp = "fROM Owner_Contact,Property_Master,Property_Specifications WHERE Owner_Contact.owner_code = Property_Master.owner_code AND Property_Master.property_no =Property_Specifications.property_cd AND Property_Master.property_no ='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" rs1.Source = "SELECT Owner_Contact.owner_code,Owner_Contact.Address,Owner_Contact.zipcode,Owner_C ontact.tel,Owner_Contact.Faxno,Owner_Contact.email,Owner_Contact.Mobile,Owner_C ontact.City,Property_Specifications.attic,Property_Specifications.balcony,Property_Speci fications.builtup_area,Property_Specifications.Description,Property_Specifications.facin g_direction,Property_Specifications.floor_no,Property_Specifications.garage,Property_S pecifications.garden,Property_Specifications.parking_space,Property_Specifications.plot _size,Property_Specifications.portico,Property_Specifications.property_cd,Property_Spe cifications.store,Property_Specifications.swiming_pool,Property_Specifications.terrace,P

roperty_Specifications.toilets,Property_Specifications.tot_bedrooms,Property_Specificati ons.type_draw_dinroom,property_master.property_type,property_master.ad_date,propert y_master.saleamount,property_specifications.description,property_specifications.facing_ direction " & temp rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst txt_customercode = rs1.Fields(0) txt_city = rs1.Fields(7) txt_faxno = rs1.Fields(4) txt_Address = rs1.Fields(1) txt_zipcode = rs1.Fields(2) txt_mobile = rs1.Fields(6) txt_telephoneno = rs1.Fields(3) txt_email = rs1.Fields(5) txt_plotsize = rs1.Fields(17) txt_builtarea = rs1.Fields(10) If IsNull(rs1.Fields(24)) Then txt_bedrooms = "" Else txt_bedrooms = rs1.Fields(24) End If If IsNull(rs1.Fields(23)) Then txt_toilets = "" Else txt_toilets = rs1.Fields(23) End If txt_facingdirection = rs1.Fields(12) If rs1.Fields(25) = "S" Then opt_drawing(0).Value = True Else opt_drawing(1).Value = True End If If rs1.Fields(14) = "True" Then chk_garage.Value = 1 Else chk_garage.Value = 0 End If If rs1.Fields(16) = "True" Then chk_parkspace.Value = 1 Else chk_parkspace.Value = 0 End If If rs1.Fields(9) = "True" Then chk_balcony.Value = 1 Else chk_balcony.Value = 0

End If If rs1.Fields(20) = "True" Then chk_store.Value = 1 Else chk_store.Value = 0 End If If rs1.Fields(18) = "True" Then chk_portico.Value = 1 Else chk_portico.Value = 0 End If If rs1.Fields(8) = "True" Then chk_attic.Value = 1 Else chk_attic.Value = 0 End If If rs1.Fields(22) = "True" Then chk_terrace.Value = 1 Else chk_terrace.Value = 0 End If If rs1.Fields(15) = "True" Then chk_garden.Value = 1 Else chk_garden.Value = 0 End If If rs1.Fields(21) = "True" Then chk_swim.Value = 1 Else chk_swim.Value = 0 End If If IsNull(rs1.Fields(13)) Then txt_flrno = "" Else txt_flrno = rs1.Fields(13) End If txt_otherdiscription = rs1.Fields(11) End If If rs1.Fields(26) = "Bunglow" Then opt_housetype(0).Value = True opt_housetype_Click (0) Else If rs1.Fields(26) = "Flat" Then opt_housetype(1).Value = True opt_housetype_Click (1) Else If rs1.Fields(26) = "Commercial" Then

opt_housetype(2).Value = True opt_housetype_Click (2) End If End If End If txt_propertyaddon = Format(rs1.Fields(27), "mm/dd/yyyy") txt_rentamount = rs1.Fields(28) txt_otherdescription = rs1.Fields(29) cmb_facingdirection.Text = rs1.Fields(30) If rs2.State = 1 Then rs2.Close End If rs2.Source = "select * from property_address where property_code='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" rs2.Open txt_propertycode = rs2.Fields(0) txt_propertyaddress = rs2.Fields(2) txt_rentcity = rs2.Fields(4) txt_rentzip = rs2.Fields(5) txt_renttelphoneno = rs2.Fields(6) rs3.Source = "select * from property_master where property_no='" & tempbigcode & "'" rs3.Open If rs3(4) = "" Then pictname = "" MsgBox "Add pictures please", vbInformation, "Property Management" End If If rs3(4) <> "" Then pictname = rs3(4) End If rs3.Close cmd_save.Enabled = True End Sub Private Sub cmd_addpicture_Click() propcode = txt_propertycode Me.Hide frm_propertyphotomodify.Show 1 End Sub Private Sub Cmd_Exit_Click() Unload Me

End Sub Private Sub cmd_householditem_Click() propcode = txt_propertycode Unload Me frm_housholdmaintenance.Show 1 End Sub Private Sub cmd_save_Click() If txt_Address = "" Then MsgBox "Please Enter the Address", vbInformation, "Property Management" txt_Address.SetFocus txt_Address.BackColor = &HC0FFFF Exit Sub Else If txt_city = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_city.SetFocus txt_city.BackColor = &HC0FFFF Exit Sub Else If txt_zipcode = "" Then MsgBox "Please Enter the Zipcode Number", vbInformation, "Property Management" txt_zipcode.SetFocus txt_zipcode.BackColor = &HC0FFFF Exit Sub Else If txt_propertyaddress = "" Then MsgBox "Please Enter the Address", vbInformation, "Property Management" txt_propertyaddress.SetFocus txt_propertyaddress.BackColor = &HC0FFFF Exit Sub Else If txt_rentcity = "" Then MsgBox "Please Enter the City Name", vbInformation, "Property Management" txt_rentcity.SetFocus txt_rentcity.BackColor = &HC0FFFF Exit Sub Else If txt_rentzip = "" Then MsgBox "Please Enter the ZipCode Number", vbInformation, "Property Management" txt_rentzip.SetFocus txt_rentzip.BackColor = &HC0FFFF Exit Sub Else

If txt_rentamount = "" Then MsgBox "Please Enter the Rent Amount", vbInformation, "Property Management" txt_rentamount.SetFocus txt_rentamount.BackColor = &HC0FFFF Exit Sub Else If txt_plotsize = " X " And txt_plotsize.Visible = True Then MsgBox "Please Enter the Plot Size", vbInformation, "Property Management" txt_plotsize.SetFocus txt_plotsize.BackColor = &HC0FFFF Exit Sub Else If opt_drawing(0).Value = False And opt_drawing(1).Value = False Then MsgBox "Please Select Seperate Drawing && Dining Room Or Common Drawing && Dining Room", vbInformation, "Property Management" opt_drawing(0).SetFocus opt_drawing(0).BackColor = &HC0FFFF Exit Sub Else If txt_builtarea = "" Then MsgBox "Please Enter the Build Area", vbInformation, "Property Management" txt_builtarea.SetFocus txt_builtarea.BackColor = &HC0FFFF Exit Sub Else If txt_toilets = "" And txt_toilets.Visible = True Then MsgBox "Please Enter the Number of Toilets", vbInformation, "Property Management" txt_toilets.SetFocus txt_toilets.BackColor = &HC0FFFF Exit Sub Else If cmb_facingdirection = "" Then MsgBox "Please Select the Facing Direction", vbInformation, "Property Management" cmb_facingdirection.SetFocus cmb_facingdirection.BackColor = &HC0FFFF Exit Sub Else If txt_bedrooms = "" And txt_bedrooms.Visible = True Then MsgBox "Please Enter the Number of Bedrooms", vbInformation, "Property Management" txt_bedrooms.SetFocus txt_bedrooms.BackColor = &HC0FFFF Exit Sub Else If txt_flrno = "" And txt_flrno.Visible = True Then

MsgBox "Please Enter the Floor Number", vbInformation, "Property Management" txt_flrno.SetFocus txt_flrno.BackColor = &HC0FFFF Exit Sub End If End If End If End If End If End If End If End If End If End If End If End If End If End If Dim j As Integer j = InStr(1, cmb_propertycode, "/", vbTextCompare) cn.Execute "delete from property_master where property_no='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" cn.Execute "delete from owner_contact where owner_code='" & Mid(cmb_propertycode, 1, j - 1) & "'" cn.Execute "delete from property_address where property_code='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" cn.Execute "delete from property_specifications where property_cd='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" savedata i = MsgBox("Your Data is Successfully Modified,Would you like to add Picture and Household items", vbInformation + vbYesNo) cmd_save.Enabled = False If i = vbYes Then cmd_householditem.Enabled = True End If If i = vbNo Then Unload Me End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set rs1 = Nothing Set rs2 = Nothing

Set rs3 = Nothing Set rs4 = Nothing Set cn = Nothing End Sub Private Sub opt_drawing_LostFocus(Index As Integer) ' opt_drawing(0).BackColor = &HFF8080 End Sub Private Sub opt_housetype_Click(Index As Integer) 'option_check If opt_housetype(2).Value = True Then Customer(20).Visible = True Customer(21).Visible = True txt_plotsize.Visible = True txt_builtarea.Visible = True chk_garage.Visible = True chk_parkspace.Visible = True cmb_facingdirection.Visible = True txt_flrno.Visible = True Customer(15).Visible = True Customer(16).Visible = True 'label.Visible = True lbl_change(31).Caption = "Floor No" lbl_change(31).Visible = True Customer(18).Visible = False Customer(23).Visible = False txt_toilets.Visible = False txt_bedrooms.Visible = False opt_drawing(0).Visible = False opt_drawing(1).Visible = False Customer(28).Visible = False Customer(14).Visible = False Customer(32).Visible = False Customer(27).Visible = False Customer(24).Visible = False garden.Visible = False chk_attic.Visible = False chk_balcony.Visible = False chk_garden.Visible = False chk_portico.Visible = False chk_store.Visible = False chk_terrace.Visible = False chk_swim.Visible = False chk_garage.Left = 1770 chk_parkspace.Left = 1770 txt_flrno.Left = 1770 Customer(15).Left = 600

Customer(16).Left = 600 lbl_change(31).Left = 600 Exit Sub End If If opt_housetype(1).Value = True Then Customer(20).Visible = False txt_plotsize.Visible = False txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = True chk_swim.Visible = False lbl_change(31).Caption = "Floor No" chk_garden.Visible = True Customer(20).Visible = False Customer(21).Visible = True Customer(18).Visible = True Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True Customer(27).Visible = True Customer(24).Visible = True txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6090 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 5100 Exit Sub End If If opt_housetype(0).Value = True Then Customer(20).Visible = True txt_plotsize.Visible = True

txt_builtarea.Visible = True txt_toilets.Visible = True opt_drawing(0).Visible = True opt_drawing(1).Visible = True chk_garage.Visible = True chk_parkspace.Visible = True chk_store.Visible = True chk_balcony.Visible = True chk_portico.Visible = True cmb_facingdirection.Visible = True chk_terrace.Visible = True chk_attic.Visible = True txt_flrno.Visible = False chk_swim.Visible = True lbl_change(31).Caption = "Swim Pool" chk_garden.Visible = True Customer(20).Visible = True Customer(21).Visible = True Customer(18).Visible = True Customer(23).Visible = True Customer(14).Visible = True Customer(15).Visible = True Customer(16).Visible = True Customer(28).Visible = True Customer(32).Visible = True Customer(27).Visible = True Customer(24).Visible = True txt_bedrooms.Visible = True garden.Visible = True chk_garage.Left = 4485 chk_parkspace.Left = 4485 txt_flrno.Left = 6090 Customer(15).Left = 3015 Customer(16).Left = 3600 lbl_change(31).Left = 4935 Exit Sub End If End Sub Private Sub Txt_Address_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_city.SetFocus End If End Sub

Private Sub txt_bedrooms_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_bedrooms_LostFocus() txt_bedrooms.BackColor = &H80000005 End Sub Private Sub txt_builtarea_Change() opt_housetype(0).Enabled = False opt_housetype(1).Enabled = False opt_housetype(2).Enabled = False End Sub Private Sub txt_builtarea_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_builtarea_LostFocus() txt_builtarea.BackColor = &H80000005 End Sub Private Sub txt_city_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_zipcode.SetFocus End If End Sub Private Sub txt_city_LostFocus() txt_city.BackColor = &H80000005 End Sub Private Sub Txt_Email_KeyPress(KeyAscii As Integer) KeyAscii = smallletter(KeyAscii) If KeyAscii = 13 Then txt_propertyaddress.SetFocus End If End Sub Private Sub txt_faxno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_mobile.SetFocus End If End Sub

Private Sub txt_houseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_location.SetFocus End If End Sub Private Sub txt_houseno_LostFocus() txt_houseno.BackColor = &H80000005 End Sub Private Sub txt_location_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_city.SetFocus End If End Sub Private Sub txt_location_LostFocus() txt_location.BackColor = &H80000005 End Sub Private Sub txt_flrno_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_mobile_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_email.SetFocus End If End Sub Private Sub txt_otherdescription_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub

Private Sub txt_ownername_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_houseno.SetFocus End If End Sub Private Sub txt_ownername_LostFocus() txt_ownername.BackColor = &H80000005

End Sub Private Sub txt_plotsize_LostFocus() txt_plotsize.BackColor = &H80000005 End Sub

Private Sub txt_propertyaddress_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentcity.SetFocus End If End Sub Private Sub txt_rentamount_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then opt_housetype(0).SetFocus End If End Sub Private Sub txt_rentamount_LostFocus() txt_rentamount.BackColor = &H80000005 End Sub Private Sub txt_rentcity_LostFocus() txt_rentcity.BackColor = &H80000005 End Sub Private Sub txt_renthouseno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentstreet.SetFocus End If End Sub Private Sub txt_renthouseno_LostFocus() txt_renthouseno.BackColor = &H80000005 End Sub Private Sub txt_rentstreet_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentcity.SetFocus End If End Sub

Private Sub txt_rentstreet_LostFocus() txt_rentstreet.BackColor = &H80000005 End Sub Private Sub txt_renttelphoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub Private Sub txt_rentzip_LostFocus() txt_rentzip.BackColor = &H80000005 End Sub Private Sub txt_telephoneno_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_faxno.SetFocus End If End Sub Private Sub txt_toilets_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub txt_toilets_LostFocus() txt_toilets.BackColor = &H80000005 End Sub Private Sub txt_totalbedroom_LostFocus() txt_totalbedroom.BackColor = &H80000005 End Sub Private Sub Timer1_Timer() Me.Caption = Right(Me.Caption, Len(Me.Caption) - 1) & Left(Me.Caption, 1) End Sub Private Sub Form_Load() Dim SpaceNums As Integer Timer1.Interval = 70 SpaceNums = Int(Me.Width / 50) Me.Caption = "Property for Rent" & Space(SpaceNums) Timer1.Enabled = True conn

rs1.Source = "SELECT Owner_Contact.Name, Property_Master.property_no From Property_Master, Owner_Contact WHERE Property_Master.owner_code = Owner_Contact.owner_code and Property_Master.property_nature='Sale'" rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst While rs1.EOF = False cmb_propertycode.AddItem rs1.Fields(1) & " rs1.MoveNext Wend End If End Sub Private Sub cmd_save_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then cmd_exit.SetFocus Exit Sub End If End Sub Private Sub txt_rentcity_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_rentzip.SetFocus Exit Sub End If End Sub Private Sub txt_renttelephoneno_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then txt_rentamount.SetFocus Exit Sub End If End Sub Private Sub txt_rentzip_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_renttelphoneno.SetFocus Exit Sub End If End Sub Private Sub txt_zipcode_KeyPress(KeyAscii As Integer)

" & rs1.Fields(0)

KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_telephoneno.SetFocus Exit Sub End If End Sub Private Sub savedata() On Error GoTo errorhandler If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from owner_contact" rs1.Open If rs2.State = 1 Then rs2.Close End If rs2.Source = "select * from property_address" rs2.Open If rs3.State = 1 Then rs3.Close End If rs3.Source = "select * from property_specifications" rs3.Open rs1.AddNew rs1.Fields(0) = Trim(tempsmallcode) rs1.Fields(1) = Trim(tempownername) rs1.Fields(2) = Trim(txt_Address) rs1.Fields(3) = Trim(txt_city) rs1.Fields(4) = Trim(txt_zipcode) rs1.Fields(5) = Trim(txt_telephoneno) rs1.Fields(6) = Trim(txt_mobile) rs1.Fields(7) = Trim(txt_email) rs1.Fields(8) = "ACTIVE" rs1.Fields(9) = Trim(txt_faxno) rs2.AddNew rs2.Fields(0) = Trim(tempbigcode) rs2.Fields(1) = Trim(tempsmallcode) rs2.Fields(2) = Trim(txt_propertyaddress) rs2.Fields(3) = Trim(txt_rentstreet) rs2.Fields(4) = Trim(txt_rentcity) rs2.Fields(5) = Trim(txt_rentzip) rs2.Fields(6) = Trim(txt_renttelphoneno)

rs3.AddNew rs3.Fields(0) = Trim(tempbigcode) rs3.Fields(1) = Trim(txt_plotsize) rs3.Fields(2) = Trim(txt_builtarea) If opt_housetype(0).Value = True Or opt_housetype(1).Value = True Then rs3.Fields(3) = Trim(txt_bedrooms) rs3.Fields(4) = Trim(txt_toilets) End If If chk_swim.Value = 1 Then rs3.Fields(5) = "True" Else rs3.Fields(5) = "False" End If If opt_drawing(0).Value = True Then rs3.Fields(6) = "S" Else rs3.Fields(6) = "C" End If If chk_garage.Value = 1 Then rs3.Fields(7) = "True" Else rs3.Fields(7) = "False" End If If chk_parkspace.Value = 1 Then rs3.Fields(8) = "True" Else rs3.Fields(8) = "False" End If If chk_balcony.Value = 1 Then rs3.Fields(9) = "True" Else rs3.Fields(9) = "False" End If If chk_store.Value = 1 Then rs3.Fields(10) = "True" Else rs3.Fields(10) = "False" End If If chk_portico.Value = 1 Then rs3.Fields(11) = "True" Else rs3.Fields(11) = "False" End If If chk_garage.Value = 1 Then rs3.Fields(12) = "True" Else rs3.Fields(12) = "False"

End If rs3.Fields(13) = Trim(txt_otherdescription) If opt_housetype(1).Value = True Or opt_housetype(2).Value = True Then If txt_flrno = "" Then rs3.Fields(14) = 0 Else rs3.Fields(14) = txt_flrno End If End If If chk_terrace.Value = 1 Then rs3.Fields(15) = "True" Else rs3.Fields(15) = "False" End If If chk_attic.Value = 1 Then rs3.Fields(16) = "True" Else rs3.Fields(16) = "False" End If If cmb_facingdirection.Text = "" Then cmb_facingdirection.Text = "No Direction" Else rs3.Fields(17) = cmb_facingdirection.Text End If If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from Property_master" rs4.Open rs4.AddNew rs4.Fields(0) = Trim(tempbigcode) rs4.Fields(1) = Trim(tempsmallcode) rs4.Fields(2) = Trim(propertystatus) rs4.Fields(3) = "V" rs4.Fields(4) = " " & pictname rs4.Fields(5) = "Sale" rs4.Fields(6) = Trim(txt_propertyaddon) rs4.Fields(9) = Trim(txt_rentamount) rs1.Update rs2.Update rs3.Update rs4.Update Exit Sub errorhandler:

cn.Execute "delete from owner_contact where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_address where owner_code='" & txt_customercode & "'" cn.Execute "delete from property_specifications where property_cd='" & propertycode & "'" cn.Execute "delete from property_master where property_no='" & propertycode & "'" MsgBox " Property Master is Enquired with Some Problem", vbInformation, "Property Management" Exit Sub End Sub

Dim r As Integer Dim list As ListItem Private Sub Cmd_Exit_Click() Unload Me End Sub Private Sub cmd_save_Click() rs.Source = "Select * from Monthly_Bill_Header where Tenant_no =" & "'" & txt_tenantrefference.Text & "'" & " " & "and" & " " & "month_nm" & "=" & "'" & txt_billmonth.Text & "'" & " " & "and" & " " & "bill_year" & "=" & txt_billyear.Text & "" rs.Open If rs.RecordCount <> 0 Then MsgBox "Bill for the selected Tenant for the month" & " " & txt_billmonth.Text & " '" & txt_billyear.Text & " " & "is already made", vbInformation, "Property Management" rs.Close Exit Sub End If If rs.State = 1 Then rs.Close End If rs.Source = "select * from Monthly_Bill_Header where bill_no='" & txt_billno.Text & "" rs.Open rs(0) = txt_billno rs(1) = txt_bildate rs(2) = txt_billmonth rs(3) = txt_billyear rs(4) = txt_tenantrefference rs(5) = txt_billamount rs(6) = "U" rs.Update rs.Close rs1.Source = "select * from Monthly_Bill_Detail where bill_no='" & txt_billno.Text & "" rs1.Open rs1(0) = txt_billno rs1(1) = txt_particular rs1(2) = txt_billamount rs1(3) = txt_bildate rs1.Update rs1.Close MsgBox "The Bill is created", vbInformation, "Property Management" cmd_save.Enabled = False End Sub

Private Sub Command1_Click() End Sub Private Sub cmd_pay_Click() billnumb = msf_modirent.TextMatrix(msf_modirent.RowSel, 2) billyr = (msf_modirent.TextMatrix(msf_modirent.RowSel, 3)) billmonth = Mid(msf_modirent.TextMatrix(msf_modirent.RowSel, 4), 1, Len(msf_modirent.TextMatrix(msf_modirent.RowSel, 4)) - 4) Me.Hide frm_paidon.Show 1 End Sub Private Sub Form_Load() conn msf_modirent.FormatString = " Tenant Code | Tenant Name | Bill Period | Status | Rent Amount " lv1 End Sub

|Bill No

| Bill Date

Private Sub lv1() If rs.State = 1 Then rs.Close End If If rs1.State = 1 Then rs1.Close End If rs.Source = "SELECT Tenant_Master.Tenant_code, Tenant_Master.Tenant_name,Monthly_Bill_Header.Bill_no, Monthly_Bill_Header.Bill_date,Monthly_Bill_Header.bill_year,Monthly_Bill_Header.M onth_nm,Monthly_Bill_Header.Payment_status,Tenant_Master.Monthly_rent From Monthly_Bill_Header, Tenant_Master Where Monthly_Bill_Header.Tenant_no = Tenant_Master.Tenant_code and Monthly_Bill_Header.payment_status='U'" rs.Open msf_modirent.Rows = 1 While rs.EOF = False msf_modirent.AddItem rs(0) & Chr(9) & rs(1) & Chr(9) & rs(2) & Chr(9) & rs(3) & Chr(9) & rs(5) & " " & rs(4) & Chr(9) & rs(6) & Chr(9) & rs(7) rs.MoveNext Wend rs.Close End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set cn = Nothing End Sub

Private Sub msf_modirent_DblClick() billnumb = msf_modirent.TextMatrix(msf_modirent.RowSel, 2) billyr = (msf_modirent.TextMatrix(msf_modirent.RowSel, 3)) billmonth = Mid(msf_modirent.TextMatrix(msf_modirent.RowSel, 4), 1, Len(msf_modirent.TextMatrix(msf_modirent.RowSel, 4)) - 4) End Sub

Dim i As Integer Private Sub CancelButton_Click() Unload Me End Sub Private Sub Form_Load() If rs.State = 1 Then rs.Close End If cdt.Text = Format(Date, "dd/mm/yyyy") pds.Value = False 'If DataEnvironment1.con.State = 0 Then ' DataEnvironment1.con.Open 'End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set cn = Nothing Unload frm_moditenantbill End Sub Private Sub OKButton_Click() If pds.Value = False Then MsgBox "Please select the option paid", vbInformation, "Property Management" pds.SetFocus Exit Sub End If If cn.State = 1 Then cn.Close End If conn rs.Source = "SELECT * From Monthly_Bill_Header WHERE Bill_no ='" & billnumb & "' AND Bill_date =#" & billyr & "# " rs.Open If rs.RecordCount <> 0 Then rs(6) = "P" rs(7) = Format(Date, "dd/mm/yyyy") rs.Update rs.Close End If 'i = MsgBox("Do You Like to Print The Reciept", vbYesNo, "Print Records") 'If i = vbYes Then 'OKButton.Enabled = False 'Unload Me 'DataEnvironment1.paidon_Grouping billmonth, bilnumb

'rptbill.Show 1 'DataEnvironment1.con.Close 'Exit Sub 'End If 'If i = vbNo Then ' Unload paidon 'Exit Sub 'End If Unload Me End Sub

Private Sub cmdadpic_Click() cdp.ShowOpen pic1 = cdp.FileName Picture1.Picture = LoadPicture(Trim(pic1)) rs.Source = "select * from Property_Master where property_no =" & "'" & propcode & "'" rs.Open If rs.RecordCount <> 0 Then rs(4) = " " & pic1 rs.Update 'MsgBox rs(4) rs.Close End If cmdadpic.Enabled = False End Sub Private Sub cmdfinish_Click() Unload Me End Sub Private Sub Form_Load() If cn.State = 1 Then cn.Close End If If rs.State = 1 Then rs.Close End If conn End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set cn = Nothing End Sub

Private Sub cmdadpic_Click() cdp.ShowOpen pic1 = cdp.FileName Picture1.Picture = LoadPicture(Trim(pic1)) cmdadpic.Enabled = False If rs.State = 1 Then rs.Close End If rs.Source = "select * from Property_Master where property_no =" & "'" & propcode & "'" rs.Open If rs.RecordCount <> 0 Then rs(4) = " " & pic1 rs.Update rs.Close End If End Sub Private Sub cmdfinish_Click() Unload Me End Sub Private Sub Form_Load() On Error GoTo errhandler If rs.State = 1 Then rs.Close End If If cn.State = 1 Then cn.Close End If conn rs.Source = "select * from Property_Master where property_no =" & "'" & propcode & "'" rs.Open If rs.RecordCount <> 0 Then If rs(4) = " " Then MsgBox "No PhotoGraph ", vbCritical Else If rs(4) <> "" Then Picture1.Picture = LoadPicture(Trim(rs(4))) End If

End If cmdadpic.Caption = "Modify Picture" End If Exit Sub errhandler: MsgBox "Photo Is Deleted From the Previous Location", vbInformation, "Property Management" Exit Sub End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set cn = Nothing End Sub

Private Sub CancelButton_Click() Unload Me End Sub Private Sub Form_Load() If cn.State = 1 Then cn.Close End If conn If rs.State = 1 Then rs.Close End If If rs1.State = 1 Then rs1.Close End If todate.Text = Format(Date, "dd/mm/yyyy") prd.Visible = True lblmonths.Visible = True Customer(0).Visible = True fromdate.Text = fromdt

Customername.Text = TenantName 'fromdate.Text = fromdt lbltill.Text = tilldate lblpropcode.Text = propcode 'periodmonths.Text = period If rs.State = 1 Then rs.Close End If rs.Source = "select * from company_info" rs.Open companyname.Text = rs(0) rs.Close rs.Source = "select * from Tenant_master where property_code='" & propcode & " '" rs.Open periodmonths.Text = rs(3) rs.Close End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set rs1 = Nothing Set rs2 = Nothing

Set cn = Nothing End Sub Private Sub OKButton_Click() 'to pass an entry to the transaction master rs1.Source = "select * from T_Property_Transaction_Ms" rs1.Open rs1.AddNew rs1(0) = lblpropcode.Text rs1(1) = todate.Text rs1(2) = "Contract is renewed for further" & " " & prd.Text & " " & "months" & "for the property " & propcode rs1(3) = todate.Text rs1(4) = lbltill.Text rs1(5) = Customername.Text rs1(6) = "O" rs1.Update rs1.Close If rs2.State = 1 Then rs2.Close End If 'to update the status of property in the tenant master rs2.Source = "Select * from Tenant_Master where property_code =" & "'" & lblpropcode.Text & "'" & " " & "and" & " " & "Tenant_name" & "=" & "'" & Customername.Text & "'" & " " & "and" & " " & "Status" & "=" & "'" & "O" & "'" rs2.Open If rs2.RecordCount <> 0 Then rs2(3) = prd.Text rs2(4) = fromdate.Text rs2(5) = lbltill.Text rs2(7) = "O" ' now this property on tenancy rs2.Update rs2.Close End If OKButton.Enabled = False 'CancelButton.Caption = "Close" Unload Me End Sub Private Sub OKButton_GotFocus() 'sd = prd.Text 'top1 = sd * 28 'top2 = CDate(Format((fdt.Text), "dd/mm/yyyy")) + top1 'tdt.Text = Format(top2, "dd/mm/yyyy") End Sub

Private Sub prd_Change() Customer(13).Caption = "This contract is from" sd = prd.Text top1 = sd * 28 top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1 lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub Private Sub prd_Click() Customer(13).Caption = "This contract is from" sd = prd.Text top1 = sd * 28 top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1 lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub Private Sub prd_LostFocus() 'Customer(13).Caption = "This contract is from" 'sd = prd.Text 'top1 = sd * 28 'top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1 'lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub

Private Sub Cmd_Exit_Click() Unload Me End Sub Private Sub Command1_Click() If cmb_notatteded.Text = "" Then MsgBox "Please Select The Type of Complaint", vbInformation, "Property Management" cmb_notatteded.SetFocus Exit Sub Else DataEnvironment1.Connection1.Open If cmb_notatteded.Text = "Rent" Then DataEnvironment1.Command5 "N", DTPicker1.Value, DTPicker2.Value DataReportNotAttendedTenent.Show 1 Else DataEnvironment1.Command4 "N", DTPicker1.Value, DTPicker2.Value DataNotAttendedComplaintReportMaintainence.Show 1 End If If DataEnvironment1.Connection1.State = 1 Then DataEnvironment1.Connection1.Close End If End If End Sub

Private Sub Cmd_Add_Click() If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from visitor_information" rs1.Open If rs1.EOF = True Then Txt_VisitorNo = "VS1" Else Txt_VisitorNo = "VS" & rs1.RecordCount + 1 End If Txt_VisitorName.Enabled = True Txt_VisitorAddress.Enabled = True Txt_VisitorAttendedBy.Enabled = True Txt_VisitorPhoneNo.Enabled = True Txt_VisitorRemark.Enabled = True Txt_VisitorName = "" Txt_VisitorAddress = "" Txt_VisitorAttendedBy = "" Txt_VisitorPhoneNo = "" Txt_VisitorRemark = "" Txt_VisitorDate = Date Txt_VisitorPropertyNo = frm_viewpropertySale.temppropertycode Cmd_Save.Enabled = True Cmd_Add.Enabled = False Txt_VisitorName.SetFocus End Sub Private Sub Cmd_Cancel_Click() Unload Me End Sub Private Sub cmd_save_Click() If Txt_VisitorName = "" Then MsgBox "Please Enter the Tenant Name", vbInformation, "Property Management" Txt_VisitorName.BackColor = &HC0FFFF Txt_VisitorName.SetFocus Exit Sub Else If Txt_VisitorAddress = "" Then MsgBox "Please Enter the Address", vbInformation, "Property Management"

Txt_VisitorAddress.BackColor = &HC0FFFF Txt_VisitorAddress.SetFocus Exit Sub End If End If If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from visitor_information" rs1.Open rs1.AddNew rs1(0) = Txt_VisitorNo rs1(1) = Txt_VisitorPropertyNo rs1(2) = Txt_VisitorName rs1(3) = Txt_VisitorPhoneNo rs1(4) = Txt_VisitorAddress rs1(5) = Txt_VisitorDate rs1(6) = Txt_VisitorRemark rs1(7) = Txt_VisitorAttendedBy rs1.Update MsgBox "Your Data is Successfully Saved", vbInformation, "Property Management" Unload Me End Sub Private Sub Command1_Click() TenantName = MSFlexGrid_Visitor.TextMatrix(MSFlexGrid_Visitor.RowSel, 3) ownername = MSFlexGrid_Visitor.TextMatrix(MSFlexGrid_Visitor.RowSel, 4) propcode = MSFlexGrid_Visitor.TextMatrix(MSFlexGrid_Visitor.RowSel, 2) Unload Me Frm_SoldPropertyContract.Show 1 End Sub Private Sub Form_Load() Dim i As Integer MSFlexGrid_Visitor.FormatString = "|Visitor No|Property No.|Owner Name Visitor Name | Type |Property Address | Visited Date "

If rs1.State = 1 Then rs1.Close End If conn rs1.Source = "SELECT Visitor_Information.Visitor_no, Property_Master.property_no, Owner_Contact.Name, Visitor_Information.Visitor_name, Property_Master.property_type,

Property_Address.Address,visitor_information.date_visited FROM Property_Address, Visitor_Information, Property_Master, Owner_Contact Where Property_Address.property_code = Visitor_Information.Interested_property_no AND Property_Address.property_code = Property_Master.property_no AND Property_Master.owner_code = Owner_Contact.owner_code AND Property_Master.Property_nature = 'Sale' and property_master.property_no= '" & propcode1 & "'" rs1.Open If rs1.EOF = True Then Else While rs1.EOF = False i=i+1 MSFlexGrid_Visitor.TextMatrix(i, 1) = rs1.Fields(0) MSFlexGrid_Visitor.TextMatrix(i, 2) = rs1.Fields(1) MSFlexGrid_Visitor.TextMatrix(i, 3) = rs1.Fields(2) MSFlexGrid_Visitor.TextMatrix(i, 4) = rs1.Fields(3) MSFlexGrid_Visitor.TextMatrix(i, 5) = rs1.Fields(4) MSFlexGrid_Visitor.TextMatrix(i, 6) = rs1.Fields(5) MSFlexGrid_Visitor.TextMatrix(i, 7) = rs1.Fields(6) rs1.MoveNext MSFlexGrid_Visitor.ColAlignment(4) = vbAlignLeft MSFlexGrid_Visitor.ColAlignment(3) = vbAlignLeft MSFlexGrid_Visitor.Rows = MSFlexGrid_Visitor.Rows + 1 Wend End If

End Sub 'Private Sub filldata() ' Dim i As Integer ' ' rs2.Source = "SELECT Visitor_Information.Visitor_no, Property_Master.property_no, Owner_Contact.Name, Visitor_Information.Visitor_name, Property_Master.property_type, Property_Address.Address FROM Property_Address, Visitor_Information, Property_Master, Owner_Contact Where Property_Address.property_code = Visitor_Information.Interested_property_no AND Property_Address.property_code = Property_Master.property_no AND Property_Master.owner_code = Owner_Contact.owner_code AND Property_Master.Property_nature = 'Maintainence'" ' rs2.Open ' i=1 ' If rs2.EOF = True Then ' Else ' rs2.MoveFirst ' While rs1.EOF = False

' ' MSFlexGrid_Visitor.Rows = flex_viewdata.Rows + 1 ' MSFlexGrid_Visitor.TextMatrix(i, 0) = rs1.Fields(0) ' MSFlexGrid_Visitor.TextMatrix(i, 1) = rs1.Fields(2) ' MSFlexGrid_Visitor.TextMatrix(i, 2) = rs1.Fields(4) ' MSFlexGrid_Visitor.TextMatrix(i, 3) = rs1.Fields(3) ' MSFlexGrid_Visitor.TextMatrix(i, 4) = rs1.Fields(1) ' rs1.MoveNext ' MSFlexGrid_Visitor.ColAlignment(4) = vbAlignLeft ' MSFlexGrid_Visitor.ColAlignment(3) = vbAlignLeft ' ' i=i+1 ' Wend ' End If 'End Sub Private Sub Form_Unload(Cancel As Integer) Set rs1 = Nothing Set rs3 = Nothing Set rs2 = Nothing Set rs4 = Nothing Set cn = Nothing Unload frm_viewpropertySale End Sub Private Sub MSFlexGrid_Visitor_Click() If rs1.State = 1 Then rs1.Close End If rs1.Source = "SELECT * from Visitor_information where visitor_no='" & MSFlexGrid_Visitor.TextMatrix(MSFlexGrid_Visitor.RowSel, 1) & "'" rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst Txt_VisitorNo = rs1.Fields(0) Txt_VisitorPropertyNo = rs1.Fields(1) Txt_VisitorName = rs1.Fields(2) Txt_VisitorAddress = rs1.Fields(4) Txt_VisitorPhoneNo = rs1.Fields(3) Txt_VisitorDate = rs1.Fields(5) Txt_VisitorRemark = rs1.Fields(6) Txt_VisitorAttendedBy = rs1.Fields(7) End If

End Sub Private Sub Txt_VisitorAddress_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_VisitorRemark.SetFocus End If End Sub Private Sub Txt_VisitorAddress_LostFocus() Txt_VisitorName.BackColor = vbWhite End Sub Private Sub Txt_VisitorAttendedBy_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Cmd_Save.SetFocus End If End Sub Private Sub Txt_VisitorName_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_VisitorAddress.SetFocus End If End Sub Private Sub Txt_VisitorName_LostFocus() Txt_VisitorName.BackColor = vbWhite End Sub Private Sub Txt_VisitorPhoneNo_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then Txt_VisitorAttendedBy.SetFocus End If End Sub Private Sub Txt_VisitorRemark_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_VisitorPhoneNo.SetFocus End If

End Sub

Private Sub Cmd_Exit_Click() Unload Me End Sub Private Sub Cmd_SellProperty_Click() ' Me.Hide ' Frm_SoldPropertyContract.Show 1 Unload Me Frm_SaleVisitedProperty.Show 1 End Sub Private Sub flex_viewdata_DblClick() Dim temp As String If rs1.State = 1 Then rs1.Close End If propcode1 = flex_viewdata.TextMatrix(flex_viewdata.RowSel, 0) temp = "Property_Specifications.property_cd AND Property_Master.property_no ='" & flex_viewdata.TextMatrix(flex_viewdata.RowSel, 0) & "'" rs1.Source = "SELECT Owner_Contact.owner_code,Owner_Contact.Address,Owner_Contact.zipcode,Owner_C ontact.tel,Owner_Contact.Faxno,Owner_Contact.email,Owner_Contact.Mobile,Owner_C ontact.City,Property_Specifications.attic,Property_Specifications.balcony,Property_Speci fications.builtup_area,Property_Specifications.Description,Property_Specifications.facin g_direction,Property_Specifications.floor_no,Property_Specifications.garage,Property_S pecifications.garden,Property_Specifications.parking_space,Property_Specifications.plot _size,Property_Specifications.portico,Property_Specifications.property_cd,Property_Spe cifications.store,Property_Specifications.swiming_pool,Property_Specifications.terrace,P roperty_Specifications.toilets,Property_Specifications.tot_bedrooms,Property_Specificati ons.type_draw_dinroom fROM Owner_Contact,Property_Master,Property_Specifications WHERE Owner_Contact.owner_code = Property_Master.owner_code AND Property_Master.property_no = " & temp rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst txt_customercode = rs1.Fields(0) txt_city = rs1.Fields(7) txt_faxno = rs1.Fields(4) txt_address = rs1.Fields(1) txt_zipcode = rs1.Fields(2) txt_mobileno = rs1.Fields(6) txt_telephone = rs1.Fields(3) txt_email = rs1.Fields(5) txt_plotsize = rs1.Fields(17)

txt_builtarea = rs1.Fields(10) If IsNull(rs1.Fields(24)) Then txt_totalbedroom = "" Else txt_totalbedroom = rs1.Fields(24) End If If IsNull(rs1.Fields(23)) Then txt_toilets = "" Else txt_toilets = rs1.Fields(23) End If txt_facingdirection = rs1.Fields(12) If rs1.Fields(25) = "S" Then opt_drawing(0).Value = True Else opt_drawing(1).Value = True End If If rs1.Fields(14) = "True" Then chk_garage.Value = 1 Else chk_garage.Value = 0 End If If rs1.Fields(16) = "True" Then chk_parkspace.Value = 1 Else chk_parkspace.Value = 0 End If If rs1.Fields(9) = "True" Then chk_balcony.Value = 1 Else chk_balcony.Value = 0 End If If rs1.Fields(20) = "True" Then chk_store.Value = 1 Else chk_store.Value = 0 End If If rs1.Fields(18) = "True" Then chk_portico.Value = 1 Else chk_portico.Value = 0 End If If rs1.Fields(8) = "True" Then chk_attic.Value = 1 Else chk_attic.Value = 0 End If If rs1.Fields(22) = "True" Then

chk_Terrice.Value = 1 Else chk_Terrice.Value = 0 End If If rs1.Fields(15) = "True" Then chk_garden.Value = 1 Else chk_garden.Value = 0 End If If rs1.Fields(21) = "True" Then chk_swim.Value = 1 Else chk_swim.Value = 0 End If If IsNull(rs1.Fields(13)) Then txt_flrno = "" Else txt_flrno = rs1.Fields(13) End If Cmd_SellProperty.Enabled = True txt_otherdiscription = rs1.Fields(11) End If End Sub Private Sub Form_Load() If cn.State = 1 Then cn.Close End If conn flex_viewdata.FormatString = "Prop Ref |Property Address |Date Added " filldata Disable End Sub Private Sub filldata() Dim i As Integer |Owner Name |Type

rs1.Source = "SELECT Property_Master.property_no,Property_Master.Ad_date,Owner_Contact.Name, Property_Address.Address,Property_Master.property_type From Owner_Contact, Property_Address, Property_Master Where Owner_Contact.owner_code = Property_Address.owner_code AND Owner_Contact.owner_code = Property_Master.owner_code AND Property_Master.Property_nature = 'Sale' AND Property_Master.status = 'V'" rs1.Open i=1 If rs1.EOF = True Then

Else rs1.MoveFirst While rs1.EOF = False flex_viewdata.Rows = flex_viewdata.Rows + 1 flex_viewdata.TextMatrix(i, 0) = rs1.Fields(0) flex_viewdata.TextMatrix(i, 1) = rs1.Fields(2) flex_viewdata.TextMatrix(i, 2) = rs1.Fields(4) flex_viewdata.TextMatrix(i, 3) = rs1.Fields(3) flex_viewdata.TextMatrix(i, 4) = rs1.Fields(1) rs1.MoveNext flex_viewdata.ColAlignment(4) = vbAlignLeft flex_viewdata.ColAlignment(3) = vbAlignLeft i=i+1 Wend End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs1 = Nothing Set cn = Nothing End Sub

Public Sub Disable() txt_customercode.Enabled = False txt_address.Enabled = False txt_city.Enabled = False txt_faxno.Enabled = False txt_telephone.Enabled = False txt_mobileno.Enabled = False txt_zipcode.Enabled = False txt_email.Enabled = False txt_plotsize.Enabled = False txt_builtarea.Enabled = False txt_totalbedroom.Enabled = False txt_toilets.Enabled = False txt_facingdirection.Enabled = False txt_otherdiscription.Enabled = False End Sub

Dim temp As String Dim j As Integer Dim i As Integer Private Sub Cmd_Exit_Click() Unload Me End Sub Private Sub Cmd_Sold_Click() If rs2.State = 1 Then rs2.Close End If If Txt_Amount = "" Then MsgBox "Please Enter the Required Field", vbInformation, "Property Management" Txt_Amount.SetFocus Exit Sub End If rs2.Source = "select * from property_master where property_no='" & Txt_OwnerCode & "'" rs2.Open rs2.Fields(3) = "S" rs2.Fields(9) = Txt_Amount.Text rs2.Update MsgBox "Congratulation,The Property is Sold", vbInformation, "Property Management" Unload Me End Sub Private Sub Form_Load() conn If rs1.State = 1 Then rs1.Close End If If rs2.State = 1 Then rs2.Close End If Txt_OwnerCode.Text = propcode TXt_SoldTo.Text = ownername Txt_OwnerName.Text = TenantName rs2.Source = "select * from property_master where property_no='" & Txt_OwnerCode & "'" rs2.Open Txt_Date = Format(Date, "dd/mm/yyyy") Txt_Amount = rs2.Fields(9)

End Sub Private Sub Form_Unload(Cancel As Integer) Set rs1 = Nothing Set rs2 = Nothing Set cn = Nothing End Sub Private Sub Txt_Amount_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub

Private Sub CancelButton_Click() Unload Me End Sub Private Sub Form_Load() If cn.State = 1 Then cn.Close End If conn If rs.State = 1 Then rs.Close End If If rs1.State = 1 Then rs1.Close End If lblcontracttype.Caption = "Termination Of" ' transaction.Text = "Termination" todate.Text = Format(Date, "dd/mm/yyyy") Customername.Text = TenantName fromdate.Text = fromdt lbltill.Text = tilldate lblpropcode.Text = propcode 'periodmonths.Text = period rs.Source = "select * from company_info" rs.Open If rs.EOF = True Then Else companyname.Text = rs(0) End If rs.Close rs.Source = "select * from Tenant_master where property_code='" & propcode & " '" rs.Open periodmonths.Text = rs(3) rs.Close End Sub Private Sub OKButton_Click() 'to pass an entery to the transaction master rs1.Source = "select * from T_Property_Transaction_Ms" rs1.Open rs1.AddNew rs1(0) = propcode rs1(1) = todate.Text rs1(2) = lblcontracttype.Caption rs1(5) = Customername.Text

rs1(6) = "Vacant" rs1.Update rs1.Close 'to update the status of property in the tenant master rs2.Source = "Select * from Tenant_Master where property_code =" & "'" & lblpropcode.Text & "'" & " " & "and" & " " & "Tenant_name" & "=" & "'" & Customername.Text & "'" & " " & "and" & " " & "Status" & "=" & "'" & "O" & "'" rs2.Open If rs2.RecordCount <> 0 Then rs2(7) = "V" ' now this property is no more on tenancy rs2.Update rs2.Close End If 'to update the status of the property in the property master rs3.Source = "Select * from Property_Master where property_no =" & "'" & lblpropcode.Text & "'" rs3.Open If rs3.RecordCount <> 0 Then rs3(3) = "V" 'now this property is again active and will be available for rent rs3.Update rs3.Close End If OKButton.Enabled = False 'CancelButton.Caption = "Close" Unload Me End Sub Private Sub OKButton_GotFocus() 'sd = prd.Text 'top1 = sd * 28 'top2 = CDate(Format((fdt.Text), "dd/mm/yyyy")) + top1 'tdt.Text = Format(top2, "dd/mm/yyyy") End Sub Private Sub prd_Change() Customer(13).Caption = "This contract is from" sd = prd.Text top1 = sd * 28 top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1 lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub Private Sub prd_Click() Customer(13).Caption = "This contract is from" sd = prd.Text top1 = sd * 28 top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1

lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub Private Sub prd_LostFocus() 'Customer(13).Caption = "This contract is from" 'sd = prd.Text 'top1 = sd * 28 'top2 = CDate(Format((todate), "dd/mm/yyyy")) + top1 'lbltill.Text = Format(top2, "dd/mm/yyyy") End Sub

Dim j As Integer Dim TenantCode As String Dim TenantName As String Dim BigPropertyCode As String Private Sub Cmb_TenantModify_click() Dim temp As String j=j+1 j = InStr(1, Cmb_TenantModify, "/", vbTextCompare) TenantCode = Trim(Mid(Cmb_TenantModify.Text, 1, 8)) TenantName = Trim(Mid(Cmb_TenantModify, j + 8, Len(Cmb_TenantModify) - j + 3)) If rs1.State = 1 Then rs1.Close End If temp = "Tenant_Personal_Info.tenant_no and Tenant_Personal_Info.tenant_no='" & Trim(Mid(Cmb_TenantModify.Text, 1, 10)) & "'" rs1.Source = "SELECT Tenant_Master.Tenant_code, Tenant_Master.Tenant_name,Tenant_Master.property_code, Tenant_Master.cont_from,Tenant_Master.contract_period, Tenant_Master.cont_to,Tenant_Master.Monthly_rent, Tenant_Personal_Info.AdvancePaid,Tenant_Master.bachlar_with_family,tenant_Personal _Info.father_name,Tenant_Personal_Info.nationality,Tenant_Personal_Info.Social_Secur ity_no,Tenant_Personal_Info.email,Tenant_Personal_Info.Work_Place,Tenant_Personal_ Info.referenceBy,Tenant_Personal_Info.visatill,Tenant_Personal_Info.type_of_Visa,Tena nt_Personal_Info.passport_no,Tenant_Personal_Info.PermanentAddress,Tenant_Personal _Info.permanentPhoneNo,Tenant_Personal_Info.Permamentcity,Tenant_Personal_Info.p ermanentzipCode,Tenant_Personal_Info.localaddress,Tenant_Personal_Info.localphonen o,Tenant_Personal_Info.localcity,Tenant_Personal_Info.localzipcode,Tenant_Personal_I nfo.religian,Tenant_Personal_Info.occupation From Tenant_Master, Tenant_Personal_Info Where Tenant_Master.Tenant_code =" & temp rs1.Open Txt_TenantCode = rs1.Fields(0) Txt_TenantName = rs1.Fields(1) Txt_propertyCode = rs1.Fields(2) Msk_Date.Text = rs1.Fields(3) Lst_ContactPeriod.Text = rs1.Fields(4) Msk_TillDate.Text = rs1.Fields(5) Txt_MonthlyRent = rs1.Fields(6) Txt_AdvancePaid = rs1.Fields(7) Txt_PersonStay = rs1.Fields(8)

Txt_FatherName = rs1.Fields(9) If rs1.Fields(10) = "UK" Then Opt_Nationality.Value = True Else Opt_Nationality1.Value = True Txt_Foreign = rs1.Fields(10) End If Txt_SocailSecurityNo = rs1.Fields(11) Txt_Email = rs1.Fields(12) Txt_Workstudyplace = rs1.Fields(13) txt_ReferenceBy = rs1.Fields(14) If rs1.Fields(15) = "/ /" Then txt_visatill = " / / " Else txt_visatill = rs1.Fields(15) End If Txt_TypeofVisa = rs1.Fields(16) Txt_PassportNo = rs1.Fields(17) Txt_PermanantAddress = rs1.Fields(18) Txt_PermanentPhoneNo = rs1.Fields(19) Txt_PermanentCity = rs1.Fields(20) Txt_PermanentZipCode = rs1.Fields(21) Txt_LocalAddress = rs1.Fields(22) Txt_LocalPhoneNo = rs1.Fields(23) Txt_LocalCity = rs1.Fields(24) Txt_LocalZipCode = rs1.Fields(25) Txt_Religion = rs1.Fields(26) Txt_Occupation = rs1.Fields(27) Cmd_Print.Enabled = True cMD_sAVE.Enabled = True End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Cmd_Exit_Click() Unload Me End Sub Private Sub Cmd_Print_Click() DataEnvironment1.Connection1.Open

DataEnvironment1.Command3 (Trim(Txt_TenantCode.Text)) Data_tenant.Show 1 If DataEnvironment1.Connection1.State = 1 Then DataEnvironment1.Connection1.Close End If End Sub Private Sub cmd_save_Click() Dim j As Integer j = InStr(1, cmb_propertycode, "/", vbTextCompare) savdata MsgBox "Your Data is Successfully Saved", vbInformation, "Property Management" cMD_sAVE.Enabled = False End Sub Private Sub Form_Load() conn rs1.Source = "select tenant_code,property_code,tenant_name from tenant_master" rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst While rs1.EOF = False Cmb_TenantModify.AddItem rs1.Fields(0) & " rs1.MoveNext Wend End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs1 = Nothing Set rs2 = Nothing Set rs3 = Nothing Set cn = Nothing End Sub Private Sub savdata() cn.Execute "Delete from Tenant_Personal_Info where tenant_no = '" & TenantCode & "'" cn.Execute "delete from Tenant_master where tenant_code= '" & TenantCode & "'" If rs2.State = 1 Then rs2.Close

" & rs1(2)

End If rs2.Source = "select * from Tenant_Personal_Info" rs2.Open If rs3.State = 1 Then rs3.Close End If rs3.Source = "select * from Tenant_master" rs3.Open rs2.AddNew rs2(0) = Trim(Txt_TenantCode) rs2(16) = Trim(Txt_FatherName) If Opt_Nationality.Value = True Then rs2(9) = "UK" End If If Opt_Nationality1.Value = True Then rs2(9) = Trim(Txt_Foreign) End If rs2(18) = Format(txt_visatill, "DD/MM/YYYY") rs2(14) = Trim(Txt_TypeofVisa) rs2(11) = Trim(Txt_PassportNo) rs2(17) = Trim(Txt_SocailSecurityNo) rs2(1) = Trim(Txt_PermanantAddress) rs2(2) = Trim(Txt_PermanentCity) rs2(3) = Trim(Txt_PermanentZipCode) rs2(4) = Trim(Txt_PermanentPhoneNo) rs2(5) = Trim(Txt_LocalAddress) rs2(6) = Trim(Txt_LocalCity) rs2(7) = Trim(Txt_LocalZipCode) rs2(8) = Trim(Txt_LocalPhoneNo) rs2(10) = Trim(Txt_Email) rs2(12) = Trim(Txt_Occupation) rs2(20) = Trim(txt_ReferenceBy) rs2(13) = Trim(Txt_Religion) rs2(15) = Trim(Txt_Workstudyplace) rs2(21) = "Photo" ' Picture rs2(19) = Trim(Txt_AdvancePaid) rs3.AddNew rs3(0) = rs1(0)

rs3(1) = Txt_propertyCode rs3(2) = Trim(Txt_TenantName) rs3(3) = Trim(Lst_ContactPeriod.Text) rs3(4) = Txt_Date rs3(5) = txt_TillDate rs3(6) = Trim(CInt(Txt_PersonStay)) ' No of Person Stay rs3(7) = "O" ' Staus rs3(8) = Trim(Txt_MonthlyRent) ' Txt_MonthlyRent rs2.Update rs3.Update End Sub

Private Sub Opt_Nationality_Click() Txt_Foreign.Enabled = False txt_visatill.Enabled = False Txt_TypeofVisa.Enabled = False Txt_SocailSecurityNo.Enabled = True End Sub Private Sub Opt_Nationality1_Click() Txt_SocailSecurityNo.Enabled = False Txt_Foreign.Enabled = True txt_visatill.Enabled = True Txt_TypeofVisa.Enabled = True End Sub

Private Sub Txt_Email_KeyPress(KeyAscii As Integer) KeyAscii = smallletter(KeyAscii) End Sub Private Sub Txt_FatherName_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub

Private Sub Txt_LocalAddress_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub

Private Sub Txt_LocalCity_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub

Private Sub Txt_LocalPhoneNo_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub Private Sub Txt_Occupation_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub Private Sub Txt_PermanantAddress_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub Private Sub Txt_PermanentCity_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub

Private Sub Txt_PermanentPhoneNo_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) End Sub

Private Sub txt_ReferenceBy_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub Private Sub Txt_Religion_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii)

End Sub

Private Sub Txt_TypeofVisa_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub

Private Sub Txt_Workstudyplace_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) End Sub

Private Sub cmb_propertycode_Click() If rs3.State = 1 Then rs3.Close End If propcode = Trim(Mid(cmb_propertycode.Text, 1, 12)) rs3.Source = "select rentamount from property_master where property_no='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "'" rs3.Open rs3.MoveFirst Txt_MonthlyRent = rs3.Fields(0) End Sub Private Sub cmdclose_Click() Unload Me End Sub Private Sub cmdsave_Click() CheckBlankPersonalTenant TenantSaveData End Sub Private Sub CheckBlankPersonalTenant() If cmb_propertycode.Text = "" Then SSTab1.Tab = 0 MsgBox "Please Select The Property Code", vbInformation, "Property Management" cmb_propertycode.BackColor = &HC0FFFF cmb_propertycode.SetFocus Exit Sub Else If Txt_TenantName = "" Then SSTab1.Tab = 0 MsgBox "Please Enter The Tenant Name", vbInformation, "Property Management" Txt_TenantName.BackColor = &HC0FFFF Txt_TenantName.SetFocus Exit Sub Else If Lst_ContactPeriod.Text = "" Then SSTab1.Tab = 0 MsgBox "Please Enter the Contract Period", vbInformation, "Property Management" Lst_ContactPeriod.BackColor = &HC0FFFF

Lst_ContactPeriod.SetFocus Exit Sub Else If Txt_PersonStay = "" Then SSTab1.Tab = 0 MsgBox "Please Enter The No. of Person Saty", vbInformation, "Property Management" Txt_PersonStay.BackColor = &HC0FFFF Txt_PersonStay.SetFocus Exit Sub Else If Txt_FatherName = "" Then MsgBox "Please Enter the Father Name", vbInformation, "Property Management" Txt_FatherName.BackColor = &HC0FFFF Txt_FatherName.SetFocus Exit Sub Else If Opt_Nationality.Value = True Then Txt_SocailSecurityNo.Locked = False If Txt_SocailSecurityNo = "" Then MsgBox "Please Enter The Social Security No.", vbInformation, "Property Management" Txt_SocailSecurityNo.BackColor = &HC0FFFF Txt_SocailSecurityNo.SetFocus Exit Sub Else If Txt_PermanantAddress = "" Then MsgBox "Please Enter the Permanant Address", vbInformation, "Property Management" Txt_PermanantAddress.BackColor = &HC0FFFF Txt_PermanantAddress.SetFocus Exit Sub Else If Txt_PermanentCity = "" Then MsgBox "Please Enter the City", vbInformation, "Property Management" Txt_PermanentCity.BackColor = &HC0FFFF Txt_PermanentCity.SetFocus Exit Sub Else If Txt_PermanentZipCode = "" Then MsgBox "Please Enter the Zip Code", vbInformation, "Property Management" Txt_PermanentZipCode.BackColor = &HC0FFFF Txt_PermanentZipCode.SetFocus Exit Sub Else

If Txt_LocalAddress = "" Then MsgBox "Please Enter the Local Address", vbInformation, "Property Management" Txt_LocalAddress.BackColor = &HC0FFFF Txt_LocalAddress.SetFocus Exit Sub Else If Txt_LocalCity = "" Then MsgBox "Please Enter the City", vbInformation, "Property Management" Txt_LocalCity.BackColor = &HC0FFFF Txt_LocalCity.SetFocus Exit Sub Else If Txt_LocalZipCode = "" Then MsgBox "Please Enter the Zip Code", vbInformation, "Property Management" Txt_LocalZipCode.BackColor = &HC0FFFF Txt_LocalZipCode.SetFocus Exit Sub End If End If End If End If End If End If End If End If End If End If End If End If End If If Opt_Nationality1.Value = True Then Txt_Foreign.Locked = False If Txt_Foreign = "" Then MsgBox "Please Enter The Country Name", vbInformation, "Property Management" Txt_Foreign.BackColor = &HC0FFFF Txt_Foreign.SetFocus Exit Sub End If txt_visatill.Enabled = True If txt_visatill = " / / " Then

MsgBox "Please Enter The Visa Validity Date", vbInformation, "Property Management" txt_visatill.BackColor = &HC0FFFF txt_visatill.SetFocus Exit Sub End If Txt_TypeofVisa.Locked = False If Txt_TypeofVisa = "" Then MsgBox "Please Enter The Type of Visa", vbInformation, "Property Management" Txt_TypeofVisa.BackColor = &HC0FFFF Txt_TypeofVisa.SetFocus Exit Sub End If Txt_PassportNo.Locked = False If Txt_PassportNo = "" Then MsgBox "Please Enter The Passport No", vbInformation, "Property Management" Txt_PassportNo.BackColor = &HC0FFFF Txt_PassportNo.SetFocus Exit Sub Exit Sub Else If Txt_PermanantAddress = "" Then MsgBox "Please Enter the Permanant Address", vbInformation, "Property Management" Txt_PermanantAddress.BackColor = &HC0FFFF Txt_PermanantAddress.SetFocus Exit Sub Else If Txt_PermanentCity = "" Then MsgBox "Please Enter the City", vbInformation, "Property Management" Txt_PermanentCity.BackColor = &HC0FFFF Txt_PermanentCity.SetFocus Exit Sub Else If Txt_PermanentZipCode = "" Then MsgBox "Please Enter the Zip Code", vbInformation, "Property Management" Txt_PermanentZipCode.BackColor = &HC0FFFF Txt_PermanentZipCode.SetFocus Exit Sub Else If Txt_LocalAddress = "" Then MsgBox "Please Enter the Local Address", vbInformation, "Property Management" Txt_LocalAddress.BackColor = &HC0FFFF

Txt_LocalAddress.SetFocus Exit Sub Else If Txt_LocalCity = "" Then MsgBox "Please Enter the City", vbInformation, "Property Management" Txt_LocalCity.BackColor = &HC0FFFF Txt_LocalCity.SetFocus Exit Sub Else If Txt_LocalZipCode = "" Then MsgBox "Please Enter the Zip Code", vbInformation, "Property Management" Txt_LocalZipCode.BackColor = &HC0FFFF Txt_LocalZipCode.SetFocus Exit Sub End If End If End If End If End If End If End If End If rs1.AddNew rs1(0) = Trim(Txt_TenantCode) rs1(16) = Trim(Txt_FatherName) If Opt_Nationality.Value = True Then rs1(9) = "UK" End If If Opt_Nationality1.Value = True Then rs1(9) = Trim(Txt_Foreign) End If rs1(18) = Trim(txt_visatill) rs1(14) = Trim(Txt_TypeofVisa) rs1(11) = Trim(Txt_PassportNo) rs1(17) = Trim(Txt_SocailSecurityNo) rs1(1) = Trim(Txt_PermanantAddress) rs1(2) = Trim(Txt_PermanentCity) rs1(3) = Trim(Txt_PermanentZipCode) rs1(4) = Trim(Txt_PermanentPhoneNo) rs1(5) = Trim(Txt_LocalAddress)

rs1(6) = Trim(Txt_LocalCity) rs1(7) = Trim(Txt_LocalZipCode) rs1(8) = Trim(Txt_LocalPhoneNo) rs1(10) = Trim(Txt_Email) rs1(12) = Trim(Txt_Occupation) rs1(20) = Trim(txt_ReferenceBy) rs1(13) = Trim(Txt_Religion) rs1(15) = Trim(Txt_Workstudyplace) rs1(21) = "Photo" ' Picture rs1(19) = Trim(Txt_AdvancePaid) rs2.AddNew rs2(0) = rs1(0) rs2(1) = Trim(Mid(cmb_propertycode.Text, 1, 12)) rs2(2) = Trim(Txt_TenantName) rs2(3) = Trim(Lst_ContactPeriod.Text) rs2(4) = Trim(txt_date) rs2(5) = Trim(txt_TillDate) rs2(6) = Trim(CInt(Txt_PersonStay)) ' No of Person Stay rs2(7) = "O" ' Staus rs2(8) = Trim(Txt_MonthlyRent) ' Txt_MonthlyRent If rs3.State = 1 Then rs3.Close End If rs3.Source = "SELECT * FROM PROPERTY_MASTER WHERE PROPERTY_NO='" & Trim(Mid(cmb_propertycode.Text, 1, 12)) & "' AND PROPERTY_NATURE='Rent'" rs3.Open rs3.Fields(3) = "O" If rs4.State = 1 Then rs4.Close End If rs4.Source = "select * from t_property_transaction_ms" rs4.Open rs4.AddNew rs4.Fields(0) = cmb_propertycode.Text rs4.Fields(1) = txt_date rs4.Fields(2) = "Property is Given For Rent" rs4.Fields(3) = txt_date rs4.Fields(4) = txt_TillDate rs4.Fields(5) = Txt_TenantName rs4.Fields(6) = "E" rs1.Update rs2.Update

rs3.Update rs4.Update MsgBox " Data is Successfully Saved", vbInformation, "Property Management"

Unload Me End Sub Private Sub Form_Load() txt_date = Format(Date, "dd/mm/yyyy") SSTab1.Tab = 0 conn rs1.Source = "select * from tenant_personal_info" rs1.Open rs2.Source = "Select * from tenant_master" rs2.Open rs3.Source = "SELECT Owner_Contact.Name, Property_Master.property_no From Property_Master, Owner_Contact WHERE Property_Master.owner_code = Owner_Contact.owner_code AND Property_Master.status = 'V' AND Property_Master.property_nature='Rent' " rs3.Open If rs3.EOF = True Then Else rs3.MoveFirst While rs3.EOF = False cmb_propertycode.AddItem rs3.Fields(1) & " " & rs3.Fields(0) rs3.MoveNext Wend End If If rs2.EOF = True Then Txt_TenantCode = "TNT1" Else Txt_TenantCode = "TNT" & rs2.RecordCount + 1 End If Txt_TenantCodePersonal = Txt_TenantCode If cmb_propertycode.ListCount >= 1 Then cmdsave.Enabled = True End If

End Sub Private Sub Form_Unload(Cancel As Integer) Set rs1 = Nothing Set rs2 = Nothing Set rs3 = Nothing Set rs4 = Nothing Set cn = Nothing End Sub Private Sub Label2_Click() loadpic End Sub Private Sub lbl_age_Click() End Sub Private Sub Lst_ContactPeriod_Change() Dim mon As Integer, period As Integer mon = Lst_ContactPeriod.Text period = 28 * mon dateme = (Date + period) txt_TillDate.Text = Format(dateme, "dd/mm/yyyy") End Sub Private Sub Lst_ContactPeriod_Click() Dim mon As Integer, period As Integer mon = Lst_ContactPeriod.Text period = 28 * mon dateme = (Date + period) txt_TillDate.Text = Format(dateme, "dd/mm/yyyy") End Sub Private Sub Lst_ContactPeriod_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Txt_AdvancePaid.SetFocus End If End Sub Private Sub Lst_ContactPeriod_LostFocus()

Lst_ContactPeriod.BackColor = vbWhite End Sub Private Sub Msk_Date_LostFocus() Msk_Date.BackColor = vbWhite End Sub Private Sub Msk_TillDate_LostFocus() Msk_TillDate.BackColor = vbWhite End Sub Private Sub Opt_Nationality_GotFocus() Label9.Visible = False Txt_Foreign.Locked = True Txt_Foreign.Visible = False Txt_Foreign = "" txt_visatill.Enabled = False txt_visatill = " / / " Txt_TypeofVisa.Locked = True Txt_TypeofVisa = "" End Sub Private Sub Opt_Nationality_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Txt_PassportNo.SetFocus Exit Sub End If End Sub Private Sub Opt_Nationality1_GotFocus() Label9.Visible = True Txt_SocailSecurityNo.Locked = True Txt_Foreign.Locked = False Txt_Foreign.Visible = True txt_visatill.Enabled = True Txt_TypeofVisa.Locked = False Txt_SocailSecurityNo = "" End Sub Private Sub Opt_Nationality1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Txt_Foreign.SetFocus Exit Sub

End If End Sub Private Sub Txt_AdvancePaid_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then Txt_PersonStay.SetFocus End If End Sub Private Sub Txt_Email_KeyPress(KeyAscii As Integer) KeyAscii = smallletter(KeyAscii) If KeyAscii = 13 Then Txt_Occupation.SetFocus Exit Sub End If End Sub Private Sub Txt_FatherName_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Opt_Nationality.SetFocus Exit Sub End If End Sub Private Sub Txt_FatherName_LostFocus() Txt_FatherName.BackColor = vbWhite End Sub Private Sub Txt_Foreign_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_visatill.SetFocus Exit Sub End If End Sub Private Sub Txt_Foreign_LostFocus() Txt_Foreign.BackColor = vbWhite End Sub Private Sub Txt_LocalAddress_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_LocalCity.SetFocus

Exit Sub End If End Sub Private Sub Txt_LocalAddress_LostFocus() Txt_LocalAddress.BackColor = vbWhite End Sub Private Sub Txt_LocalCity_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_LocalZipCode.SetFocus Exit Sub End If End Sub Private Sub Txt_LocalCity_LostFocus() Txt_LocalCity.BackColor = vbWhite End Sub Private Sub Txt_LocalPhoneNo_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then Txt_Email.SetFocus Exit Sub End If End Sub Private Sub Txt_LocalPhoneNo_LostFocus() Txt_LocalPhoneNo.BackColor = vbWhite End Sub Private Sub Txt_LocalZipCode_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Txt_LocalPhoneNo.SetFocus Exit Sub End If End Sub Private Sub Txt_LocalZipCode_LostFocus() Txt_LocalZipCode.BackColor = vbWhite End Sub

Private Sub Txt_Occupation_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then txt_ReferenceBy.SetFocus Exit Sub End If End Sub Private Sub Txt_PassportNo_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_SocailSecurityNo.SetFocus Exit Sub End If End Sub Private Sub Txt_PassportNo_LostFocus() Txt_PassportNo.BackColor = vbWhite End Sub Private Sub Txt_PermanantAddress_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_PermanentCity.SetFocus Exit Sub End If End Sub Private Sub Txt_PermanantAddress_LostFocus() Txt_PermanantAddress.BackColor = vbWhite End Sub Private Sub Txt_PermanentCity_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_PermanentZipCode.SetFocus Exit Sub End If End Sub Private Sub Txt_PermanentCity_LostFocus() Txt_PermanentCity.BackColor = vbWhite End Sub Private Sub Txt_PermanentPhoneNo_KeyPress(KeyAscii As Integer)

KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then Txt_LocalAddress.SetFocus Exit Sub End If End Sub Private Sub Txt_PermanentPhoneNo_LostFocus() Txt_PermanentPhoneNo.BackColor = vbWhite End Sub Private Sub Txt_PermanentZipCode_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Txt_PermanentPhoneNo.SetFocus Exit Sub End If End Sub Private Sub Txt_PermanentZipCode_LostFocus() Txt_PermanentZipCode.BackColor = vbWhite End Sub Private Sub Txt_PersonStay_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then SSTab1.Tab = 1 Txt_FatherName.SetFocus End If End Sub Private Sub Txt_PersonStay_LostFocus() Txt_PersonStay.BackColor = vbWhite End Sub Private Sub txt_ReferenceBy_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_Religion.SetFocus Exit Sub End If End Sub Private Sub Txt_Religion_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii)

If KeyAscii = 13 Then Txt_Workstudyplace.SetFocus Exit Sub End If End Sub Private Sub Txt_SocailSecurityNo_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Txt_PermanantAddress.SetFocus Exit Sub End If End Sub Private Sub Txt_SocailSecurityNo_LostFocus() Txt_SocailSecurityNo.BackColor = vbWhite End Sub Private Sub Txt_TenantName_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Lst_ContactPeriod.SetFocus End If End Sub Private Sub Txt_TenantName_LostFocus() Txt_TenantName.BackColor = vbWhite End Sub Private Sub Txt_TypeofVisa_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_PassportNo.SetFocus Exit Sub End If End Sub Private Sub Txt_TypeofVisa_LostFocus() Txt_TypeofVisa.BackColor = vbWhite End Sub Private Sub txt_visatill_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Txt_TypeofVisa.SetFocus Exit Sub

End If End Sub Private Sub txt_visatill_LostFocus() txt_visatill.BackColor = vbWhite End Sub Private Sub Txt_Workstudyplace_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then cmdsave.SetFocus Exit Sub End If End Sub Public Sub loadpic() On Error GoTo sd CommonDialog1.DialogTitle = "Add Tenant PhotoGraph" CommonDialog1.Filter = "(*.bmp)||(*.jpeg)" CommonDialog1.DefaultExt = "*.bmp" CommonDialog1.Flags = cdlOFNHideReadOnly CommonDialog1.ShowOpen Picture1.Picture = LoadPicture(CommonDialog.FileName) Exit Sub sd: MsgBox "Invalid or no Image", vbInformation, "Property Management" Exit Sub End Sub

Public Sub TenantSaveData() End Sub

Dim c Private Sub cmd_adpic_Click() propcode = prt.Caption Unload Me frm_propertyphotomodify.Show 1 End Sub Private Sub cmd_modify_Click() det.Rows = 0 cmd_modify.Enabled = False cmdnext.Enabled = True cmd_adpic.Enabled = True End Sub Private Sub cmdclose_Click() Unload Me End Sub Private Sub cmdnext_Click() If des.Text = "" Then MsgBox "Please enter the descriptions", vbInformation, "Property Management" des.SetFocus Exit Sub End If If qt.Text = "" Then MsgBox "Please enter the quantity", vbInformation, "Property Management" qt.SetFocus Exit Sub End If If det.Text <> "" Then ' ' ' ' det.TextMatrix(i, 1) = des.Text det.TextMatrix(i, 2) = "" det.TextMatrix(i, 3) = "" det.TextMatrix(i, 4) = "" For i = 0 To det.Rows - 1 If sl.Text = det.TextMatrix(i, 0) Then det.TextMatrix(i, 1) = des.Text det.TextMatrix(i, 2) = mk.Text det.TextMatrix(i, 3) = md.Text det.TextMatrix(i, 4) = qt.Text End If Next

End If det.AddItem sl.Text & Chr(9) & des.Text & Chr(9) & mk.Text & Chr(9) & md.Text & Chr(9) & qt.Text, c sl.Text = c + 1 des.Text = "" mk.Text = "" md.Text = "" qt.Text = "" des.SetFocus cmdsave.Enabled = True End Sub Private Sub cmdsave_Click() Dim r, i 'to add modify records rs.Source = "Select * from Property_Household where property_code =" & "'" & propcode & "'" rs.Open rs1.Source = "select * from property_fixture where property_code =" & "'" & propcode & "'" rs1.Open If rs.RecordCount <> 0 Then rs.MoveLast r = rs.RecordCount rs.MoveFirst For i = 1 To r rs.Delete rs.MoveNext Next For i = 0 To (det.Rows - 1) rs.AddNew rs(0) = prt.Caption rs(1) = det.TextMatrix(i, 0) rs(2) = det.TextMatrix(i, 1) rs(3) = det.TextMatrix(i, 2) rs(4) = det.TextMatrix(i, 3) rs(5) = det.TextMatrix(i, 4) rs.Update Next End If If chk_fireplace.Value <> 0 Or chk_chimney.Value <> 0 Or txt_numberenterances.Text <> "" Then rs1(0) = prt.Caption If chk_fireplace.Value = 1 Then rs1(1) = "Y" Else rs1(1) = "N"

End If If chk_chimney.Value = 1 Then rs1(2) = "Y" Else rs1(2) = "N" End If If txt_numberenterances.Text <> "" Then rs1(3) = txt_numberenterances.Text End If rs1.Update rs1.Close cmdsave.Enabled = False cmdnext.Enabled = False End If i = MsgBox("Records successfully Modified! Would You Like to Add Photograph too!!!!", vbInformation + vbYesNo) If i = vbYes Then cmd_adpic.Enabled = True End If If i = vbNo Then Unload Me End If End Sub Private Sub des_Change() If Len(des.Text) > 250 Then MsgBox "Sorry you can enter maximum of 250 letters", vbInformation, "Property Management" des.Text = Left(des.Text, 250) Exit Sub End If End Sub Private Sub det_DblClick() If det.Text <> "" Then sl.Text = det.TextMatrix(det.RowSel, 0) des.Text = det.TextMatrix(det.RowSel, 1) mk.Text = det.TextMatrix(det.RowSel, 2) md.Text = det.TextMatrix(det.RowSel, 3) qt.Text = det.TextMatrix(det.RowSel, 4) End If End Sub Private Sub ef_Change() If Len(ef.Text) > 50 Then

MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" ef.Text = Left(ef.Text, 50) Exit Sub End If End Sub Private Sub flr_Change() If Len(flr.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" flr.Text = Left(flr.Text, 50) Exit Sub End If End Sub Private Sub Form_Activate() prt.Caption = propcode sl.Text = 1 End Sub Private Sub Form_Load() cmdnext.Enabled = False If cn.State = 1 Then cn.Close End If conn Dim r, i If rs.State = 1 Then rs.Close End If prt.Caption = propcode rs.Source = "Select * from Property_Household where property_code =" & "'" & propcode & "'" rs.Open If rs.RecordCount <> 0 Then rs.MoveLast r = rs.RecordCount rs.MoveFirst For i = 0 To r - 1 det.AddItem rs(1) & Chr(9) & rs(2) & Chr(9) & rs(3) & Chr(9) & rs(4) & Chr(9) & rs(5), i

rs.MoveNext Next End If rs.Close rs.Source = "Select * from property_fixture where property_code =" & "'" & propcode & "'" rs.Open If rs.RecordCount <> 0 Then If rs(1) = "Y" Then chk_fireplace.Value = 1 End If If rs(2) = "Y" Then chk_chimney.Value = 1 End If If rs(3) <> "" Then txt_numberenterances.Text = rs(3) End If End If rs.Close det.ColWidth(0) = 615 det.ColWidth(1) = 4335 det.ColWidth(2) = 1215 det.ColWidth(3) = 1215 det.ColWidth(4) = 750 'det.TextMatrix(0, 0) = "Item #" 'det.TextMatrix(0, 1) = " Descriptions" 'det.TextMatrix(0, 2) = " Make" 'det.TextMatrix(0, 3) = " Model" 'det.TextMatrix(0, 4) = "Quantity" cmdsave.Enabled = False End Sub Private Sub Form_Unload(Cancel As Integer) Set rs = Nothing Set rs1 = Nothing Set cn = Nothing End Sub Private Sub md_Change() If Len(md.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" md.Text = Left(md.Text, 50) Exit Sub End If End Sub Private Sub mk_Change()

If Len(mk.Text) > 100 Then MsgBox "Sorry you can enter maximum of 100 letters", vbInformation, "Property Management" mk.Text = Left(mk.Text, 100) Exit Sub End If End Sub Private Sub qt_KeyPress(KeyAscii As Integer) If KeyAscii >= 65 And KeyAscii <= 121 Then KeyAscii = 0 End If End Sub Private Sub tdor_Change() If Len(tdor.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" tdor.Text = Left(tdor.Text, 50) Exit Sub End If End Sub Private Sub twind_Change() If Len(twind.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" twind.Text = Left(twind.Text, 50) Exit Sub End If End Sub Private Sub wf_Change() If Len(wf.Text) > 50 Then MsgBox "Sorry you can enter maximum of 50 letters", vbInformation, "Property Management" wf.Text = Left(wf.Text, 50) Exit Sub End If End Sub

Private Sub Cmb_Visitor_Click() Cmd_Go.Enabled = True End Sub Private Sub Cmd_Go_Click() If Cmb_Visitor.Text = "" Then MsgBox "Please Select the Visitor Type", vbInformation, "Property Management" Cmb_Visitor.SetFocus Exit Sub Else DataEnvironment1.Connection1.Open DataEnvironment1.Command2 (Trim(Cmb_Visitor.Text)), DTPicker1.Value, DTPicker2.Value DataReport_visitor.Show 1 If DataEnvironment1.Connection1.State = 1 Then DataEnvironment1.Connection1.Close End If End If End Sub Private Sub Command1_Click() Unload Me End Sub Private Sub Form_Load() DTPicker1.Value = Date DTPicker2.Value = Date End Sub

Private Sub Cmd_Add_Click() If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from visitor_information" rs1.Open If rs1.EOF = True Then Txt_VisitorNo = "VS1" Else Txt_VisitorNo = "VS" & rs1.RecordCount + 1 End If Txt_VisitorName.Enabled = True Txt_VisitorAddress.Enabled = True Txt_VisitorAttendedBy.Enabled = True Txt_VisitorPhoneNo.Enabled = True Txt_VisitorRemark.Enabled = True Txt_VisitorName = "" Txt_VisitorAddress = "" Txt_VisitorAttendedBy = "" Txt_VisitorPhoneNo = "" Txt_VisitorRemark = "" Txt_VisitorDate = Date Txt_VisitorPropertyNo = frm_viewpropertySale.temppropertycode cmd_save.Enabled = True Cmd_Add.Enabled = False Txt_VisitorName.SetFocus End Sub Private Sub Cmd_Cancel_Click() Unload Me End Sub Private Sub cmd_save_Click() If Txt_VisitorName = "" Then MsgBox "Please Enter the Tenant Name", vbInformation, "Property Management" Txt_VisitorName.BackColor = &HC0FFFF Txt_VisitorName.SetFocus Exit Sub Else If Txt_VisitorAddress = "" Then MsgBox "Please Enter the Address", vbInformation, "Property Management"

Txt_VisitorAddress.BackColor = &HC0FFFF Txt_VisitorAddress.SetFocus Exit Sub End If End If If rs1.State = 1 Then rs1.Close End If rs1.Source = "select * from visitor_information" rs1.Open rs1.AddNew rs1(0) = Trim(Txt_VisitorNo) rs1(1) = Trim(Txt_VisitorPropertyNo) rs1(2) = Trim(Txt_VisitorName) rs1(3) = Trim(Txt_VisitorPhoneNo) rs1(4) = Trim(Txt_VisitorAddress) rs1(5) = Trim(Txt_VisitorDate) rs1(6) = Trim(Txt_VisitorRemark) rs1(7) = Trim(Txt_VisitorAttendedBy) rs1(8) = "Sale" rs1.Update MsgBox "Your Data is Successfully Saved", vbInformation, "Property Management" Unload Me End Sub Private Sub Form_Load() 'conn Dim i As Integer MSFlexGrid_Visitor.FormatString = "|Visitor No|Property No.|Owner Name Visitor Name | Type |Property Address | Visited Date "

If rs1.State = 1 Then rs1.Close End If rs1.Source = "SELECT Visitor_Information.Visitor_no, Property_Master.property_no, Owner_Contact.Name, Visitor_Information.Visitor_name, Property_Master.property_type, Property_Address.Address,visitor_information.date_visited FROM Property_Address, Visitor_Information, Property_Master, Owner_Contact Where Property_Address.property_code = Visitor_Information.Interested_property_no AND Property_Address.property_code = Property_Master.property_no AND Property_Master.owner_code = Owner_Contact.owner_code AND Property_Master.Property_nature = 'Sale' and property_master.property_no= '" & frm_viewpropertySale.temppropertycode & "'"

rs1.Open If rs1.EOF = True Then Else While rs1.EOF = False i=i+1 MSFlexGrid_Visitor.TextMatrix(i, 1) = rs1.Fields(0) MSFlexGrid_Visitor.TextMatrix(i, 2) = rs1.Fields(1) MSFlexGrid_Visitor.TextMatrix(i, 3) = rs1.Fields(2) MSFlexGrid_Visitor.TextMatrix(i, 4) = rs1.Fields(3) MSFlexGrid_Visitor.TextMatrix(i, 5) = rs1.Fields(4) MSFlexGrid_Visitor.TextMatrix(i, 6) = rs1.Fields(5) MSFlexGrid_Visitor.TextMatrix(i, 7) = rs1.Fields(6) rs1.MoveNext MSFlexGrid_Visitor.ColAlignment(4) = vbAlignLeft MSFlexGrid_Visitor.ColAlignment(3) = vbAlignLeft MSFlexGrid_Visitor.Rows = MSFlexGrid_Visitor.Rows + 1 Wend End If

End Sub Private Sub Form_Unload(Cancel As Integer) Set rs1 = Nothing Set rs3 = Nothing Set rs2 = Nothing Set rs4 = Nothing Set cn = Nothing Unload frm_viewpropertySale End Sub Private Sub MSFlexGrid_Visitor_Click() If rs1.State = 1 Then rs1.Close End If rs1.Source = "SELECT * from Visitor_information where visitor_no='" & MSFlexGrid_Visitor.TextMatrix(MSFlexGrid_Visitor.RowSel, 1) & "'" rs1.Open If rs1.EOF = True Then Else rs1.MoveFirst Txt_VisitorNo = rs1.Fields(0) Txt_VisitorPropertyNo = rs1.Fields(1) Txt_VisitorName = rs1.Fields(2) Txt_VisitorAddress = rs1.Fields(4)

Txt_VisitorPhoneNo = rs1.Fields(3) Txt_VisitorDate = rs1.Fields(5) Txt_VisitorRemark = rs1.Fields(6) Txt_VisitorAttendedBy = rs1.Fields(7) End If End Sub Private Sub Txt_VisitorAddress_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_VisitorRemark.SetFocus End If End Sub Private Sub Txt_VisitorAddress_LostFocus() Txt_VisitorName.BackColor = vbWhite End Sub Private Sub Txt_VisitorAttendedBy_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then cmd_save.SetFocus End If End Sub Private Sub Txt_VisitorName_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_VisitorAddress.SetFocus End If End Sub Private Sub Txt_VisitorName_LostFocus() Txt_VisitorName.BackColor = vbWhite End Sub Private Sub Txt_VisitorPhoneNo_KeyPress(KeyAscii As Integer) KeyAscii = numeric(KeyAscii) If KeyAscii = 13 Then Txt_VisitorAttendedBy.SetFocus End If End Sub Private Sub Txt_VisitorRemark_KeyPress(KeyAscii As Integer) KeyAscii = capletter(KeyAscii) If KeyAscii = 13 Then Txt_VisitorPhoneNo.SetFocus End If End Sub

Option Explicit ' Reg Key Security Options... Const READ_CONTROL = &H20000 Const KEY_QUERY_VALUE = &H1 Const KEY_SET_VALUE = &H2 Const KEY_CREATE_SUB_KEY = &H4 Const KEY_ENUMERATE_SUB_KEYS = &H8 Const KEY_NOTIFY = &H10 Const KEY_CREATE_LINK = &H20 Const KEY_ALL_ACCESS = KEY_QUERY_VALUE + KEY_SET_VALUE + _ KEY_CREATE_SUB_KEY + KEY_ENUMERATE_SUB_KEYS + _ KEY_NOTIFY + KEY_CREATE_LINK + READ_CONTROL ' Reg Key ROOT Types... Const HKEY_LOCAL_MACHINE = &H80000002 Const ERROR_SUCCESS = 0 Const REG_SZ = 1 ' Unicode nul terminated string Const REG_DWORD = 4 ' 32-bit number Const gREGKEYSYSINFOLOC = "SOFTWARE\Microsoft\Shared Tools Location" Const gREGVALSYSINFOLOC = "MSINFO" Const gREGKEYSYSINFO = "SOFTWARE\Microsoft\Shared Tools\MSINFO" Const gREGVALSYSINFO = "PATH" Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long Private Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As Long Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long Private Sub cmdSysInfo_Click() Call StartSysInfo End Sub Private Sub cmdOK_Click() Unload Me End Sub Private Sub Command1_Click() StartSysInfo End Sub Private Sub Form_Load() 'Me.Caption = "About " & App.Title

'lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision 'lblTitle.Caption = App.Title End Sub Public Sub StartSysInfo() On Error GoTo SysInfoErr Dim rc As Long Dim SysInfoPath As String ' Try To Get System Info Program Path\Name From Registry... If GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFO, gREGVALSYSINFO, SysInfoPath) Then ' Try To Get System Info Program Path Only From Registry... ElseIf GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFOLOC, gREGVALSYSINFOLOC, SysInfoPath) Then ' Validate Existance Of Known 32 Bit File Version If (Dir(SysInfoPath & "\MSINFO32.EXE") <> "") Then SysInfoPath = SysInfoPath & "\MSINFO32.EXE" ' Error - File Can Not Be Found... Else GoTo SysInfoErr End If ' Error - Registry Entry Can Not Be Found... Else GoTo SysInfoErr End If Call Shell(SysInfoPath, vbNormalFocus) Exit Sub SysInfoErr: MsgBox "System Information Is Unavailable At This Time", vbOKOnly End Sub Public Function GetKeyValue(KeyRoot As Long, KeyName As String, SubKeyRef As String, ByRef KeyVal As String) As Boolean Dim i As Long ' Loop Counter Dim rc As Long ' Return Code Dim hKey As Long ' Handle To An Open Registry Key Dim hDepth As Long ' Dim KeyValType As Long ' Data Type Of A Registry Key Dim tmpVal As String ' Tempory Storage For A Registry Key Value Dim KeyValSize As Long ' Size Of Registry Key Variable '------------------------------------------------------------

' Open RegKey Under KeyRoot {HKEY_LOCAL_MACHINE...} '-----------------------------------------------------------rc = RegOpenKeyEx(KeyRoot, KeyName, 0, KEY_ALL_ACCESS, hKey) ' Open Registry Key If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError tmpVal = String$(1024, 0) KeyValSize = 1024 ' Handle Error...

' Allocate Variable Space ' Mark Variable Size

'-----------------------------------------------------------' Retrieve Registry Key Value... '-----------------------------------------------------------rc = RegQueryValueEx(hKey, SubKeyRef, 0, _ KeyValType, tmpVal, KeyValSize) ' Get/Create Key Value If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError ' Handle Errors

If (Asc(Mid(tmpVal, KeyValSize, 1)) = 0) Then ' Win95 Adds Null Terminated String... tmpVal = Left(tmpVal, KeyValSize - 1) ' Null Found, Extract From String Else ' WinNT Does NOT Null Terminate String... tmpVal = Left(tmpVal, KeyValSize) ' Null Not Found, Extract String Only End If '-----------------------------------------------------------' Determine Key Value Type For Conversion... '-----------------------------------------------------------Select Case KeyValType ' Search Data Types... Case REG_SZ ' String Registry Key Data Type KeyVal = tmpVal ' Copy String Value Case REG_DWORD ' Double Word Registry Key Data Type For i = Len(tmpVal) To 1 Step -1 ' Convert Each Bit KeyVal = KeyVal + Hex(Asc(Mid(tmpVal, i, 1))) ' Build Value Char. By Char. Next KeyVal = Format$("&h" + KeyVal) ' Convert Double Word To String End Select GetKeyValue = True rc = RegCloseKey(hKey) Exit Function ' Return Success ' Close Registry Key ' Exit

GetKeyError: ' Cleanup After An Error Has Occured... KeyVal = "" ' Set Return Val To Empty StringValue = False ' Return Fai RegCloseKey(hKey) ' Close Registry KeyEnd Function

Dim intIndex, intCounter As Integer Dim boolValue As Boolean Private Sub Form_Load() frmStartUp.Top = (Screen.Height - frmStartUp.ScaleHeight) / 2 frmStartUp.Left = (Screen.Width - frmStartUp.ScaleWidth) / 2 ShpArr(0).FillColor = vbBlue intIndex = 0 intCounter = 1 boolValue = False 'tmrTimer.Interval = 50 End Sub Private Sub Picture1_Click() End Sub Private Sub tmrTimer_Timer() Call mChangeColor(intIndex, &H8000000B) If (boolValue = False) Then intIndex = intIndex + 1 If (intIndex >= 9) Then boolValue = True End If ElseIf (boolValue = True) Then intIndex = intIndex - 1 If (intIndex <= 0) Then boolValue = False End If End If Call mChangeColor(intIndex, vbRed) intCounter = intCounter + 1 If intCounter = 70 Then Unload Me MdiMain.Show End If End Sub Private Sub mChangeColor(ByVal indx As Integer, ByVal Color As Long) ShpArr(indx).FillColor = Color End Sub

Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long Private Const MF_BYPOSITION = &H400& Private ReadyToClose As Boolean Private Sub RemoveMenus(frm As Form, _ remove_restore As Boolean, _ remove_move As Boolean, _ remove_size As Boolean, _ remove_minimize As Boolean, _ remove_maximize As Boolean, _ remove_seperator As Boolean, _ remove_close As Boolean) Dim hMenu As Long ' Get the form's system menu handle. hMenu = GetSystemMenu(hwnd, False) If remove_close Then DeleteMenu hMenu, 6, MF_BYPOSITION If remove_seperator Then DeleteMenu hMenu, 5, MF_BYPOSITION If remove_maximize Then DeleteMenu hMenu, 4, MF_BYPOSITION If remove_minimize Then DeleteMenu hMenu, 3, MF_BYPOSITION If remove_size Then DeleteMenu hMenu, 2, MF_BYPOSITION If remove_move Then DeleteMenu hMenu, 1, MF_BYPOSITION If remove_restore Then DeleteMenu hMenu, 0, MF_BYPOSITION End Sub Private Sub DataGrid1_Click() End Sub Private Sub MDIForm_Load() RemoveMenus Me, False, False, _ False, False, False, True, True Dim SpaceNums As Integer Timer1.Interval = 70 SpaceNums = Int(Me.Width / 50) Me.Caption = "Swapnil Shrivastava Managment System" & Space(SpaceNums) Timer1.Enabled = True End Sub Private Sub mnnggg_Click()

Frm_ReportNotAttended.Show 1 End Sub Private Sub MnuAboutUs_Click() frmAbout.Show 1 End Sub Public Sub MnuAddCompany_Click() Frm_DetailCompany.Show 1 End Sub Private Sub mnuAddMaintenance_Click() Frm_houseForMaintainance.Show 1 End Sub Private Sub mnuAddTenant_Click() Frm_TenantNew.Show 1 End Sub Private Sub mnuAddyRent_Click() frm_houseforrent.Show 1 End Sub Private Sub mnuAddySale_Click() Frm_HouseforSale.Show 1 End Sub Private Sub mnucreate_Click() frm_createtenantbill.Show 1 End Sub Private Sub mnuatt_Click() frm_ComplaintsReport.Show 1 End Sub Private Sub mnuattw_Click() frm_ComplaintsReport.Show 1 End Sub Private Sub mnuComplaintBill_Click() frm_complaintbill.Show 1 End Sub Private Sub mnucreatebill_Click() frm_createtenantbill.Show 1 End Sub Private Sub mnucreatemaintanence_Click()

Frm_createbill.Show 1 End Sub Private Sub MnuExit_Click() End End Sub Private Sub mnumodibill_Click() frm_moditenantbill.Show 1 End Sub Private Sub mnuModiftyTenant_Click() Frm_TenantModify.Show 1 End Sub Private Sub mnuModifyMaintenance_Click() Frm_ModifyMaintainence.Show 1 End Sub Private Sub mnuModifyRent_Click() Frm_ModifyRent.Show 1 End Sub Private Sub mnuModifySale_Click() Frm_ModifySale.Show 1 End Sub Private Sub mnunAtttended_Click() Frm_ReportNotAttended.Show 1 End Sub Private Sub mnuNewComplaint_Click() Frm_CreateNewComplaint.Show 1 End Sub Private Sub mnuProperty_Click() ViewPrHistory.Show 1 End Sub Private Sub MnuSellProperty_Click() Frm_SellProperty.Show 1 End Sub Private Sub mnuViewMaintenance_Click() frm_viewpropertymaintainence.Show 1 End Sub Private Sub mnuViewRent_Click()

frm_viewpropertyrent.Show 1 End Sub Private Sub mnuViewSale_Click() frm_viewpropertySale.Show 1 End Sub Private Sub MnuViewTenant_Click() frm_viewtenant.Show 1 End Sub Private Sub mnuVisitor_Click() frm_visitorReport.Show 1 End Sub Private Sub mnuVisitor1_Click() frm_visitorReport.Show 1 End Sub Private Sub Timer1_Timer() Me.Caption = Right(Me.Caption, Len(Me.Caption) - 1) & Left(Me.Caption, 1) End Sub Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) End Sub

Private Sub Command1_Click() If cmb_billno.Text = "" Then MsgBox "Please Select The Bill No First", vbInformation, "Property Management" cmb_billno.SetFocus Exit Sub Else DataEnvironment1.Connection1.Open DataEnvironment1.Command1_Grouping cmb_billno DataReport_BillInformation.Show 1 If DataEnvironment1.Connection1.State = 1 Then DataEnvironment1.Connection1.Close End If End If End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Form_Load() conn rs1.Source = "select bill_no from maint_bill_detail group by bill_no" rs1.Open If rs1.EOF = True Then MsgBox "No Bill No Yet Created", vbInformation, "Property Management" Else rs1.MoveFirst While rs1.EOF = False cmb_billno.AddItem (rs1.Fields(0)) rs1.MoveNext Wend End If End Sub Private Sub Form_Unload(Cancel As Integer) Set rs1 = Nothing Set cn = Nothing End Sub

You might also like