adding buttons to each record

swarv

Registered User.
Local time
Today, 00:33
Joined
Dec 2, 2008
Messages
196
Hi all,

I have a query here that displays all data from a certain table.

But when it displays the table data on the form (I have it as a query as a subform in a form) I want it so the user can click on one of the records and click either accept or decline on that record. So there is an accept or decline button on each record. How would I add buttons each record that shows?

When clicks accept it moves the data somewhere else and when declines it deletes the data. (I can do this bit)

Any ideas?
Thanks
Martin
 
Hi all,

I have a query here that displays all data from a certain table.

But when it displays the table data on the form (I have it as a query as a subform in a form) I want it so the user can click on one of the records and click either accept or decline on that record. So there is an accept or decline button on each record. How would I add buttons each record that shows?

When clicks accept it moves the data somewhere else and when declines it deletes the data. (I can do this bit)

Any ideas?
Thanks
Martin

you can create a form in datasheet view that has your query results then put the action in the onclick event of the record
 
oh right, that seems to work for 1 button but what if I need 2 buttons, i saying accept and 1 saying decline?
 
oh right, that seems to work for 1 button but what if I need 2 buttons, i saying accept and 1 saying decline?

you can create another form that will open up and you can have your 2 buttons on that allowing you to do anything you want with the record
 
ok that sounds good. how would I pull that specific record accross to the new form? how will it know which one i clicked on?
 
do you want to pull the new record or do you want to delete/accept it? when you accept it, what are you supposed to do with it?
 
I would like to pull that record accross to new new form and then have 2 buttons on the new form, 1 saying accept and 1 decline. then I was going to have it so that when they click accept it adds that data to another table and if decline then it just emails the original user and deletes that record from the tbl_holiday.
Thanks
 
see the attached DB sample. It should give you a good start
 

Attachments

could you explain that please, I have looked in it and can't see the bit that helps? Thanks for this.
 
If you double click on a record in frm_test it allows you to open a form to that record which then allows you to delete the record. I didnt put code in to accept or anything like that. You will have to to that.
 
I can load frm_test and it looks like it loads qry_test. when I could click any box it doesn't do anything. any ideas?
 
click on the record selector to the left of the record that has the > on it. That will activate the double click of the record
 
thats great.
I have copied what I can from your database, but this statement is still chucking up an error.
any ideas?

approveID is in the subform in a tab control.

SELECT qry_approve.ID, qry_approve.name, qry_approve.start_date
FROM qry_approve
WHERE (((qry_approve.ID)=[forms]![frm_homepage].[approveID]));
 

Users who are viewing this thread

Back
Top Bottom