I have a simple database that is used to store reports generated by officers within my department. I need to find a way to "lock" reports once they're completed and submitted by an officer. Once a report is locked, it can be opened but not modified.
I've tried to use the "Allow Edits" property but that won't work because if an officer is working on a report and closes the window, they can no longer modify it, even if they haven't completed and submitted it.
I thought of a few ways to do this, but I'm not sure exactly how to do any of them.
Have a "Submit Report" button on the form that once clicked, copies the record from the "Reports" table to the "Completed Reports" table. The information in the "Completed Reports" table is read only.
I don't really have a preference on how it works, I just need to have it so once a report is submitted, it cannot be modified
any thoughts on how I could go about doing this?
Related
How can I run a report whenever another report runs. I have a situation when an invoice report is executed by user, a copy invoice report should be executed for the same parameters provided to first report. I tried the action property of text to execute another report but nothing happened. How this text box trigger another report at the same time first report runs? Or if there is another way we can do this? There are no C#/Bn.Net code used to create or run report. Only SSRS controls or its related properties. Thanks
If you are administrator of your report server you can configure the history of your report.
go in the report properties, then go to the "instantatnious options" (sorry translated from french so don't know what'll give in english), and then select the checkbox "stock all instants of this report in the history"
that way every time the report is read a history of the report is stored
I'm new and appreciate help on my question!
My spreadsheet acts as a sales tool, where info is entered in various cells to run sensitivity analysis. Once the salesperson picks a desired option they "submit it". The data submitted is then stored on a separate sheet in the spreadsheet (call it the "database").
I want the database sheet to store all user submissions. The problem is when multiple users are using the sales tool worksheet at the same time, the info they enter gets overwritten by other user's inputs before they can submit.
I'd like multiple users to be able to use the "sales tool" sheet simultaneously without overwriting eachother, but still be able to submit data to the "database" sheet.
Appreciate ideas?
You can use the Lock Service to take a lock on the spreadsheet and then release it once you've written to it.
Besides the Lock Service (already mentioned by Srik) there's the Sheet.appendRow function, which is way easier to use and much faster. But only makes sense if you're inserting new data to a sheet and not really writing to the same cells.
Can't you use a form?
This way people could insert data without actually modify the spreadsheet...
When a user enters data into a form control, the On Update event fires code which enters data to the table via other controls on the form. So for example, entering a BMI of 31 into one field updates the corresponding Obesity field to show that the person is clinically obese.
When I upload data directly into the table, is there a way for me to get this VBA code to run and update all the necessary values, without having to manually go into each record via the form and do something to fire it?
Not in version 2007, Access 2010 includes "data macro's" which can monitor table updates. For 2007 you would need a copy running on a standalone machine somewhere that could check the table in a loop and then fire events if it detects a change.
when I do changes in a table and then close it and look in the form which shows it, the updates are not visible until I refresh the form. Can I attach - like, a trigger whenever the table is updated, all forms in which it is present are updated to reflect the new state? The only events I found were Enter and Exit, and those are not what I'm looking for since I will most often edit the data in the actual table, not by Entering and Exiting it within a form.
Can I attach - like, a trigger whenever the table is updated, all forms in which it is present are updated to reflect the new state?
Access versions prior to 2010 offer nothing for this. Access 2010 added a feature called data macros which can supposedly act somewhat like triggers in other rdbms products. However I don't know whether data macro capabilities would allow you to refresh selected open forms; I suspect not.
If the issue is the forms never update at all after you modify the table data ... until/unless you manually refresh the form ... double-check the Recordset Type property on the Data tab of the form's property sheet. And if that property is set as Snapshot, change it to Dynaset.
If you can't resolve this any other way, you could build a new form for the table. Do your table edits in that form. And in that form's after insert, update, and delete events add code to requery any of the related forms which are open. But I wouldn't want to do that ...
I have a database in MS Access and within it I am holding dates for expirations for SSL's. I want to set a reminder for any SSL that is soon to expire. Anyone know the easiest way to go about this?
It all depends on how you want the notification to work.
You can pop-up a form when the database opens
or at any time using a timer
or in a form event
You can build events into Outlook
You can run some script in the task manager
You can send an email using any of the above.
The easiest way to pop-up a form may be to create a form that runs when the database opens or when the menu form opens. This can be set in the start-up options. The form should be based on a query that checks for out of date records and is only made visible if there is data. You can check the recordset in the load event to see if anything is returned. This for can also use DoCmd.SendObject to send an email.