Need help with sticky question

DougM

Registered User.
Local time
Today, 02:34
Joined
Apr 18, 2004
Messages
26
I am helping out a friend with a database he has been using for years, and wants to make a couple of changes to it.

1. Right now he has a form that shows the people he has entered into it (#, First Name, Last Name) this is tied to a table with that same information, on another table is all the stuff connected with that person (#, item, price, item 2, price 2, etc) what he would like to do is on the form showing all these people have a button that would enable him to delete out the selected person, as well as all of their stuff in the other table. Is there a way to do this??

2. He has query in which you can select if a particular person is a "volunteer" or not, when doing this you have to change all the "N" to "Y". Is there anyway to set it so that once you change 1 "N" into a "Y" it will change all of them? again this is in a query.

3. He backs up his database every day to a zip drive, does anyone know of maybe a way to add a button or command that would automatcally do this? or some way to set it up so that you hit one command and it is done?

4. Last question, he want to empty out the database and start it over, is there a simple way to do this, other than recreating the database?

Thanks!!!!
I am still learning access, so obviously I am not much help to him, but I know where to go to ask the questions :)

Doug
 
Can maybe help with a couple

1) If cascade delete is set between People table and People Information table through the Primary Key to Foreign Key the deleting a Person will delete a specific Primary key value which will delete foreign key all records associated with that specific primary key. Be aware also that if this deletes primary key values in the secondary table that have 1:M links with other tables then the cascade delete will continue. Moral here. Be very very sure what you are doing and take a backup first.

2) Do not understand. If A person becomes a volunteer set the value to Y. If this value is in the People Information table then it is in the wrong table

3) Leave to somebody more knowledgeable

4) Delete records in all tables that appear on the One side on 1:M relationships. Providing Cascade Delete in enabled (see 1) then all associated records will go.
L
 
sounds good, can you give me a bit more info?

Len Boorman said:
Can maybe help with a couple

1) WOW, umm can you tell me how to use that command, and give me a little bit more info on how to do it?

2) This value is not set in any table, it is "constucted" from a query on a form, you click a button, that opens a "query window" in which a certain person selling for that month is listed, you can then change the N next to each one of several options to a Y. I would like it so that once you change one, it will automatically change all of them. Is there any way to do that?

3) Leave to somebody more knowledgeable

4) umm what is 1M? and can you give me a bit more info?


THANKS!
 
1) I trust that you have set up the relationships between your tables within the relationships window.

Right Click on Database window and select relationships or select from toolbar.

This is where you should create the structure of your application. You can set the relationships by dragging the Primary Key to the Foreign Key and then defining the relationship properties which include cascade update, delete and referential integrity along with One to Many (1:M) and One to One (1:1 unusual).

I guess that you have not done this and it is probable that you will have some referential integrity's to resolve.

2) If they are all to be the same why not just have One option

3) 1:M and 1:1. One to Many and One to One relationships. See 1

Len B
 

Users who are viewing this thread

Back
Top Bottom