updating access database record with form - ms-access

I need some help creating an Access database to record hours worked / amount charged by employee. Simplified, each employee charges hours to specified work codes. I pull a report that lists all codes and the amount of dollars available to charge to. This report is uploaded into Access 2007 as Work_Codes_Table. The data in the report cannot be modified.
I need to create a form that shows the available work codes and allows the employee to enter the amount they will charge to each separate code. This data will be saved into Employee_Hours_Table, leaving the original data unchanged. I want to save this data for future reference.
Right now I have the Work_Codes_Table setup correct and a split form that shows all of the active work codes, but I am stuck on the next piece.

Related

MS Access: How to search a value on a table by clicking on a form record

I'm pretty new to Access and coding in general and I've been working on a database that was filled with data extracted from SAP.
I have a query that works as a way to "summarize" the information of a bunch of records from some purchase orders, it does sum the total of each PO, it's date as well as other information. It does consolidate a variety of items related to the purchase order into a single record that is displayed in a continuous subform for easy analysis in this structure.
[MES_CORTE][SOLPED][PO][FirstMIGO][TOTALPOVALUE]
This way, the user can preview easily each purchase order, date, value and other relevant information. This query is also used to generate some reports.
However, I want to be able of opening the source table ([Registro_OC]) and search the related records by clicking a field on the subform for a detailed view and posibly to edit or enter new data. is it posible?
I've tried to code some macros but can't figure out how to reference the table fields related to the query fields that are on the form.
Also, it seems that Access doesn't allow to create subforms based on continous forms.
Any help and opinions are appreciated.

Firestore Cloud Function Trigger only when path updates with new entire

I have a firestore database that looks like this
/entries/ ....
/users/{userid}...
a bunch of documents is being sent into ... of entries and userid contains on 8 docs of user profile information.
my problem is that the entries doc contains field hours and no relation to the user doc which contains the field weekly_capacity
I need to aggregate this the two fields hours/weekly capacity setting them to Full-time equivalency variable
But the Full-time equivalency needs to be accurate and this company FTE can change so it would need to calculate the FTE over various date even if the user changed their FTE status x number of times.
And the current app only fetched the entries when the user logins into the app, which can be whenever.
None of the API requests that I am using will give me a json that holds both weekly_capacity and hours on the same fetch. If every time a user logs into the app firestore calls the http to fetch all entries then how can I compare the hours field on the collection's entries to the weekly_capacity field
Just a little context: FTE = Full-time equivalency and is used to measure as a standard to see if an employee compares to there core commit hours they signed up for which is 40. SO if I agreed to work 40 and I work actually work 40 hours then I would be 1 whole FTE. If I worked 20 and I suppose to work 40 I am .5 FTE. The math is really simple it's just that in my situation the variable FTE can change any time and the app will allow the user to enter a range of dates fetching the total actual hours they worked and FTE letting them know how many hours they were supposed to work vs how many hours they actually worked. Since the variable changes, I need some way in firestore to track the change and aggregate correctly against the hours actually worked. To give an error example: let's say I changed my FTE from 1 to .7 on March 20th, I then want to generate a report of March 1 to March 30th stating my hours worked and FTE status meaning did I reach my goal. The kicker is that I can't fetch or merge the entries which hold the var hours and /users/ which hold the var weekly_capacity.
I don't even think a cloud function would solve the problem since entries are only fetched when the user logins in right?
I'm assuming the following for answering your question.
Requirement: To calculate FTE for a user when user's weekly_capacity is updated or user logs in.
Problems:
Some way in firestore to track the change.
Calculate FTE correctly according to the change.
Here's what I think will solve the problems.
Google Cloud Firestore supports listeners for the collections in which you store the data. So you can listen for any change in users collection and entries collection. This is how you can track the change.
To calculate FTE, when a change is made to weekly_capacity of user document or a new entry is made to entries collection you need to query both collections separately to get the records corresponding to the user affected. You can also use a collections-group query for this purpose but that depends on your database design.
Hope that helps.

Access: Inventory Management with 2 seperate criteria

im a bit of a newbie in access and i hope im not asking a stupid question. I have recently had to move an inventory system from excel to access. Each product is recipted in tbl.rct and has an order number a lot number quantity and expiry.
Each individual lot number needs to be verified before it can be recipted this information is on tbl.lot.
While making a form to receipt products i noticed that i couldnt add any products without their lot number already on lot.tbl - is there a way to get around this?
http://imgur.com/kCc7G39
Attached relationships
I think you mix between Excel and the Access. These Table imported directly from the excel without any requirement change to meet Access Goals. The Database use to reduce the repeat routine work. The Tables that most be (Products, Order, Receipts, Lot must be Stock and collect data of (Qty, lot#, expiry, damage). Now we make sequence to how insert to Database. Open New Receipt to include in the stock the Product(link ID) and the detail. This is now in the warehouse. For selling you will make invoice when select product will show you the Lot available and its expiry and of course you select filter to filter on FIFP LIFO.
You can send me the excel file to convert to database if yes please provide me more information because the flow not clear well

Access 2010 update date field based on another field

I'm relatively new to Access and VBA but I have managed to get some basic VBA tricks working in both Access and Excel. Now I've got a challenge that I can't seem to crack. I'm building a database to track maintenance of a small trucking fleet. I've got most of the tables and forms I need to do the basic tracking and management of equipment and maintenance in place.
One of the things we're tracking is called PM's which stands for preventative maintenance (lube jobs and oil changes). We do those on calendar intervals for trailers and mileage intervals for tractors. Right now, I'm trying to get the calendar tracked equipment working. I've a table called tblEquipmentMaster which is where all the specifics for each piece of equipment is kept (make, model, year, VIN, etc) and that table has a field called LastPMDate. All the maintenance records go in two other tables, tblMaintenance which records the unit number, vendor, invoice date and invoice amount and tblMaintenanceDetails which records the each line item of work that was performed on the unit (i.e. replaced water pump, replaced headlight etc).
The maintenance details table also contains a drop down list of standard maintenance codes to allow for easier searching of certain maintenance items later. One of those codes is PM. I also have several forms built to interact with these tables including a data entry form for adding new maintenance records.
What I'm trying to accomplish is to have the LastPMDate field for any unit number in tblEquipmentMaster automatically update to match the InvoiceDate field in tblMaintenance anytime an invoice is entered for that unit number which has a line item containing the code PM.
I've tried building an update query to do this but in addition to changing the LastPMDate field like I want it to, it also ends up changing the invoice dates for all previous PM invoices to the date of the last invoice which contained a PM. Not good.
So my question is, would an update query be the best way to do this or would I be better off with some sort of VBA solution? I have an add record button on my maintenance invoice data entry form which users use as a save record/clear form button when all the info for an invoice has been entered. I'm thinking some VBA code tied to the on_click of that button which would look at the invoice you just added, determine if it contains the PM maintenance code, then update LastPMDate field for that unit number with invoice date from that invoice would be a good way to do it but I honestly have no idea what functions or methods I'd need to get that to work.
Any insights or suggestions appreciated.
It's very hard to follow the flow of what you are describing, even if I have experience of PM and AM (Autonomous maintenance).
What is lacking is the relations between the three tables.
Nevertheless I prefer VBA solutions (maybe because I started programming when everything had to be written...). With VBA you can finely control your workflow.
If I understood well the 1st table is tblMaintenance in which you have the Invoice data.
Then you should have to scan the tblMaintenanceDetails to find the list of PMs and filter the tblEquipmentMaster with current PM value to update the LastPMDate with the date of the 1st table.
Did I succeed in providing you an idea to solve your problem?
Let me know.

Microsoft Access - Variable Overrides in Reports

I'm currently in the process of creating an extensive Access report (~50 calculated fields) for a client and while I've gotten 99% of the report down, I'm having trouble handling the Sum and Count logic on the report.
In a nutshell, the report is intended to list the attendees at an event, tally up the number of attendees at each track/course, and also list any outstanding dues which will be paid at the door. In addition, and this is where I'm having trouble, the report also shows the revenue from each track/course along with a breakdown of the revenue from commuters vs. people staying overnight.
At the moment, all of the formulas follow fairly similar structures so despite having 50 fields, 99% of those are simply adjusting the fields to fit the relevant variables.
For the report now with revenue, my issue is that although I have the fee data specified in the data tables, Microsoft Access keeps zeroing out the calculations rather than displaying the total on the fly.
Here's two of the formals I'm using:
=((Count([W1]))*[Fee Charged W1])
=Sum([Room & Meals])
Earlier today I think I pinpointed the problem to the fact that Microsoft Access is showing the report essentially per individual rather than displaying one report for the entire dataset. I've confirmed this because I manually checked the data and noticed some fields had null values which explained the null tallies.
My question now is whether there is a way to assign a default value for variables in reports so that the report cancels out any invalid data in the database table? I imagine using VBA would help, but I have little experience in that realm.
Thanks very much in advance for any assistance
Just found the solution which was right under my nose the entire time. I just had to configure the fields to use a Running Sum (also called a Cumulative Total).
The answer came right from a page in the Microsoft Office Website: http://office.microsoft.com/en-us/access-help/summing-in-reports-HA001122444.aspx