Results 1 to 9 of 9
  1. #1
    ilbo is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    4

    real estate matching

    Hi guys,



    I have 2 tables... On the 1st one i put all my apartments (city, sqm, rooms, price) and on the 2nd I put all the requests of my clients.

    If one of the apartments matches with the request, the record of this apartment should appear automatically, on the client's report.

    Is there a way to do that without making a query for every request? i'll try to better explain: I'd like add a request and, automatically, see on the report of this request all the apartments that could match with this request. If I add a new apartment, and it matches with one or more requests, it should automatically appear on the report of every single customer that is looking for such apartment.....thank you in advance...

  2. #2
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Doesn't joining the criteria fields of both ClientRequests table & Apartments table give the desired results ?

    Thanks

  3. #3
    ilbo is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    4
    Hi, thanks for your answer.

    Do you mean make a relantionship between tables?

  4. #4
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Yes, perhaps something like :
    Code:
    SELECT 
    	tblClientRequests.idCl, 
    	tblClientRequests.ClientName, 
    	tblClientRequests.[city], 
    	tblClientRequests.[sqm], 
    	tblClientRequests.[rooms], 
    	tblApts.AptID, 
    	tblApts.[city], 
    	tblApts.[sqm], 
    	tblApts.[rooms]
    FROM 
    	tblClientRequests 
    	LEFT JOIN 
    	tblApts 
    	ON 
    	(tblClientRequests.[rooms]=tblApts.[rooms]) 
    	AND 
    	(tblClientRequests.[sqm]=tblApts.[sqm]) 
    	AND 
    	(tblClientRequests.[city]=tblApts.[city]);
    Thanks

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    ilbo,

    There is a free data model here that models a generic real estate business. Your tables should look something like those in the model. If you make a list of the questions you intend to ask of your data base, you can "test the model or your modified model" to ensure all of your questions can be answered. If there are questions for which you can not get an answer, then you'll have to adjust the model to include the data/fields to supply such answers.

    Good luck.

  6. #6
    ilbo is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    4
    Thank you Orange!

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    You're welcome. Happy to help.
    There are some great samples and explanations at Martin Green's site that may be of use to you. If it isn't relevant now, keep the link as a reference. As you get into vba and or sql, the samples will help.

    For database and table design info see this tutorial. You'll have to wotk through it, but you will learn.

  8. #8
    ilbo is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    4
    Quote Originally Posted by recyan View Post
    Yes, perhaps something like :
    Code:
    SELECT 
        tblClientRequests.idCl, 
        tblClientRequests.ClientName, 
        tblClientRequests.[city], 
        tblClientRequests.[sqm], 
        tblClientRequests.[rooms], 
        tblApts.AptID, 
        tblApts.[city], 
        tblApts.[sqm], 
        tblApts.[rooms]
    FROM 
        tblClientRequests 
        LEFT JOIN 
        tblApts 
        ON 
        (tblClientRequests.[rooms]=tblApts.[rooms]) 
        AND 
        (tblClientRequests.[sqm]=tblApts.[sqm]) 
        AND 
        (tblClientRequests.[city]=tblApts.[city]);
    Thanks
    Hello, I'm trying to understand the way to relate the tables...

    In a table I have all the main feautures of a house and an Id of the research of a client
    in another table I have all the records about what a client is looking for..I related the Id of the client to the Idresearch...but making an inner or outer join does not work...

    thank you!

  9. #9
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Why do you have ID of research of a client in the House Features table ?
    Do not know the details of your project, but based on what you have told, perhaps you should have below tables :
    tblHouses ( Contains the Houses ( HouseID - PK ) with their Features ) - Master Table
    tblClients ( Contains the Clients ( ClientID - PK ) with their details, such as Name, Contact No, EmailID, Address, etc ) - Master Table
    tblClientRequests ( Contains the Requests of the Clients ( RequestID - PK; ClientID - FK ) with the Request Details )

    Do not know what Client Research indicates ?

    Apart from above, you should have
    tblCities - ( CityID - PK, Name of City ) - Master Table

    -------

    You should aim for standardising the sqm & rooms.

    Try sitting down with the link ( design ) that orange has given & You should be able to tailor it to your needs.

    In my sql code, the standardisation of sqm, rooms, etc; is critical.

    Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 10-24-2011, 08:01 AM
  2. Replies: 1
    Last Post: 08-11-2011, 11:33 AM
  3. Help Me Build My Real Estate Database (Please)
    By Walkinglucid in forum Access
    Replies: 12
    Last Post: 03-24-2011, 10:47 AM
  4. Translating Windows name into Real Name
    By runthis457 in forum Forms
    Replies: 13
    Last Post: 02-14-2011, 06:20 PM
  5. real time clock
    By krai in forum Access
    Replies: 1
    Last Post: 05-13-2010, 05:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums