Accept/Reject Buttons

  • Thread starter Thread starter Sharks2431
  • Start date Start date
S

Sharks2431

Guest
Currently, I have 2 forms based upon 1 table. One form is smaller and has mostly the same fields as the other form. Because of this, most of the smaller forms fields go straight into the larger forms fields as well (2 different groups of people use these forms, thats why there are two forms).

Now what I want is to have 2 buttons on the larger main form. I want an "Approve" toggle button, that when pressed, sends all of the data of the current record from the smaller form into a completely seperate table. So, I basically want a button that will send data from a few fields in a form to a new table.

I also want a command "Reject" button. When this button is pressed, the same fields in the larger form are copied over into that same table (Same as Accept Button) but then are deleted from this form.

If anyone wants to know why I have to do this, allow me to explain. There are only a few people who are allowed to see the main, larger form. These people will decide if what the other workers input into the smaller table is correct. If it is correct, it stays on the main form, if its not they want it deleted off that main form. However, whether or not the data is rejected or accepted, they still need a seperate record of the information. That's why I need the seperate table. It may seem unorthodox but I hope there's a way to do it. Any help is appreciated!
 
I did something similar with

append

and

delete

queries run off of a button.
 
Do you think you could explain it to me how it was done exactly? I'm fairly new to Access and I'm not even sure what appending queries actually does.
 
From microsoft help
Append Queries An append query adds a group of records from one or more tables to the end of one or more tables. For example, suppose that you acquire some new customers and a database containing a table of information on those customers. To avoid typing all this information into your own database, you'd like to append it to your Customers table.
 
So I would append 2 queries in this case. The larger query that holds all of the data and the new query that the data would be transferred to? How would I add that to a button though? And how would I append specific fields? I don't want the entire table copying over, just a few fields. Sorry if these are stupid questions.

Would it be possible for you to attach your database as an example for me or is that asking too much?
 
you would use 2 append queries correct. in the accept you would have one append query run, and in the reject you would have another run where it would append to the 2 different tables respectively.

in the button you would do a docmd.openquery "yourqueryname"

you can select what fields to add in the query design grid.
 
Okay, so I'm just working on the "Accept" toggle button first. I found the 2 correct tables, selected certain fields and then saved the query. I double clicked the query and it appended all the records over to the correct table. So I'm definetely getting somewhere. :o

The only problem is, I don't want every record to be appended when the button is clicked. I just want the current record the user is on to be appended when they hit the button. Is this possible?

EDIT: I just searched on google how to append a single record and I noticed that by taking out the "FROM tablename" is supposed to do just that. However, I tried it and ran the append query and it asked for all the values in a small textbox for the record. I'm getting closer, but I certainly don't want my users to enter the data in again.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom