Deactivate the print report button. for a specific report

azhar2006

Registered User.
Local time
Today, 12:39
Joined
Feb 8, 2012
Messages
297
Hello guys .
I have a database that contains reports belonging to people, some of these people have a lack of their information in the table. Everyone has their own report. How can I make the print report button deactivated to print the report for some of them and with the option of the database operator?
 
make a table having all the reports for that person: LoginID, REPORT

in a form you can fill the combo/list box of reports based on the userID, so the user can just pick the rpt.
select Report from tReports where [LoginID]= forms!fReports!txtUserID

make a button so user can run it.

when the form opens , fill in the locked txtbox txtUserID:
Code:
Private Sub Form_Load()
txtUserID = Environ("Username")
End Sub

now the user can only pick reports they own.
 
make a table having all the reports for that person: LoginID, REPORT

in a form you can fill the combo/list box of reports based on the userID, so the user can just pick the rpt.
select Report from tReports where [LoginID]= forms!fReports!txtUserID

make a button so user can run it.

when the form opens , fill in the locked txtbox txtUserID:
Code:
Private Sub Form_Load()
txtUserID = Environ("Username")
End Sub

now the user can only pick reports they own.
Thank you very much, my friend.
Actually, I chose the report based on the ID number, this thing I did before. But what I want is that through the toggle button close the print button. The print button cannot be activated again without a password. So this employee's report is not printed.
 
Here is an example, my friend. When we deactivate the print button, no one can return it except through a password
 

Attachments

Hope this helps...
Thank you (theDBguy) This is what I want. Thank you, my friend, but there is one point, which is when you move to the other person, the print button remains inactive. And I want when I move to the other person, the Option8 goes back to being inactive :) 🌷
 
Thank you (theDBguy) This is what I want. Thank you, my friend, but there is one point, which is when you move to the other person, the print button remains inactive. And I want when I move to the other person, the Option8 goes back to being inactive :) 🌷
Who would be activating the button? Where would you store the password? Would each person have a different password? If the button was deactivated, did you want it to stay deactivated even after closing and reopening the form?
 
Who would be activating the button? Where would you store the password? Would each person have a different password? If the button was deactivated, did you want it to stay deactivated even after closing and reopening the form?
Activating the button or deactivating the button may be for one person in the table or two people out of a total of hundreds of them. This person cannot print his report because there is some missing information in his record. But other people who have all the information do not need to close the print button on them, and there is no objection to printing a report for it. When the form is closed, the person who closed the print button for his report remains active until it is activated again through the password. It does not matter the password is subject to change or not or kept in a separate table The employee who raises the activation or deactivation of the button is one.
 
Activating the button or deactivating the button may be for one person in the table or two people out of a total of hundreds of them. This person cannot print his report because there is some missing information in his record. But other people who have all the information do not need to close the print button on them, and there is no objection to printing a report for it. When the form is closed, the person who closed the print button for his report remains active until it is activated again through the password. It does not matter the password is subject to change or not or kept in a separate table The employee who raises the activation or deactivation of the button is one.
Unfortunately, all that information is not included in the demo you posted. You will need a separate table or a rule to determine which users are not allowed to print. I modified your demo to include a checkbox in the table to show which users are not allowed to print, just to demonstrate what I mean. In your original database, we'll need the actual table and data that will determine this. For example, it could be a simple as using DLookup() or DSum() or DCount() to check for that information.
 

Attachments

Unfortunately, all that information is not included in the demo you posted. You will need a separate table or a rule to determine which users are not allowed to print. I modified your demo to include a checkbox in the table to show which users are not allowed to print, just to demonstrate what I mean. In your original database, we'll need the actual table and data that will determine this. For example, it could be a simple as using DLookup() or DSum() or DCount() to check for that information.
Thank you my friend (DBG) This is all that is needed, you are really great. Greetings to you who helped me and to all the people in this wonderful forum. Thanks again 🌻
 
Thank you my friend (DBG) This is all that is needed, you are really great. Greetings to you who helped me and to all the people in this wonderful forum. Thanks again 🌻
You're welcome. We're all happy to assist. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom