hi, im planning a database for a boarding house containing 10 residents and 10 rooms. i need some sample code or if someone can post a sample database it would be most helpful.
here is a description of what i want to do:
================================
tblRESIDENT
id_person (PK)
name
tblROOM
id_room (PK)
id_person (FK)
arrive_date
depart_date
at the end of one year, i want the user through a form, to be given the option to save certain records from the RESIDENT table. Since only 10 slots are available (validation rule <= 10) and each year there are new comers, we only work with the current records. but if the user wants to keep the old residents for reference i want to make it so they can click a button and it takes all the records in which the departure date (depart_date) is not NULL and it creates a new table (ie.tblOLDRESIDENTS) containing these records. so that in RESIDENT we can now add new residents.
* i would also want to make it so it prompts the user to choose a name for the new table before saving it. (but this is not really important)
================================================
i hope its clear up to here.
i have no idea how to do all this, so i hope someone can help.
i know we can do update or insert into table. but i don't know if its possible to cut from a table and paste into another table.
the reason why i need this is that this program will be for billing purposes, and for the users convienience, only the current residents of the house are viewed in the forms. but i plan on having a form with the OLD residents in case the user wishes to view who lived when for statistical or some other reason.
thanks
here is a description of what i want to do:
================================
tblRESIDENT
id_person (PK)
name
tblROOM
id_room (PK)
id_person (FK)
arrive_date
depart_date
at the end of one year, i want the user through a form, to be given the option to save certain records from the RESIDENT table. Since only 10 slots are available (validation rule <= 10) and each year there are new comers, we only work with the current records. but if the user wants to keep the old residents for reference i want to make it so they can click a button and it takes all the records in which the departure date (depart_date) is not NULL and it creates a new table (ie.tblOLDRESIDENTS) containing these records. so that in RESIDENT we can now add new residents.
* i would also want to make it so it prompts the user to choose a name for the new table before saving it. (but this is not really important)
================================================
i hope its clear up to here.
i have no idea how to do all this, so i hope someone can help.
i know we can do update or insert into table. but i don't know if its possible to cut from a table and paste into another table.
the reason why i need this is that this program will be for billing purposes, and for the users convienience, only the current residents of the house are viewed in the forms. but i plan on having a form with the OLD residents in case the user wishes to view who lived when for statistical or some other reason.
thanks