Forms :: Calculate Subtotal On Subform And Display On Upper Subform
Jun 20, 2013
im having problems getting a subform to calculate another subform's total and display it as it keeps coming up with the #NAME?.Basically my database is like this
tblCustomer
- tblOrders
- tblItems
and this is displayed on a form. so you can flick through clients, then flick through the orders and its broken down into the items inside each order.i have seen many answers that are only about calculating something on a subform and displaying on a form but this does not work when displaying on a 'parent' subform. the form structure looks like this
i have a calculated control textbox in the footer of sFrmCustomerOrders with sums up all the prices using =sum([Price])and in my sFrmCustomerItems, i have a field called Amount (the total amount of all the items) and the Control Source formula i was using was =[Forms]![sFrmCustomerOrders]![sFrmCustomerItems]![txtTotalPrice] but i get a #NAME? error.
find the attached MS access DB for INVOICE printing . I am facing two issues there .
1. {form INVOICE } sub-total must be Calculated from line total on {INVOICE DATA Subform} , I know this can be accomplished by adding a new field at sub-form and calling that value to main form's sub-total field .
2. And the real issue is i want to save this value from subtotal on form INVOICE to table field name subtotal .
3.I wish to make a reporting format for each INVOICE NUMBER , whenever report is being generated , the report shows more than 1 invoice details .
I have a problem with calculating sum of fields in the footer of subform
The subform consists of following 5 fields Opis kolicina txtCena rabat CenaSpop
Opis is combobox (cbododatki), which takes values from another table (tbldodatki) SELECT DISTINCT [IDdodatki], [Opis], [Cena] FROM tbldodatki ORDER BY [Opis]; Kolicina is enetered manually Rabat is entered manually Cena is calculated with =cbododatki.column(2) Cenaspop is a calculation of [kolicina]*[txtCena]*(1-[rabat])
In such case i cant get Access to calculate the Sum in the footer of the subform
On the other hand, if i add an additional column to the source table (tblPodrobNaroc) of this subform (frmPodrobNaroc) where i enter Cena manually (instead of only being part of cbododatki), then all calculations are fine.
Which option do you reccomend, should i:
a) add to the source table of subform (tblPodrobNaroc) another column with values of Cena from tbldodatki (how is that done?), which would be filled in through cbododatki, and then perform needed calculations b) call Cena in subform in such way that the Access recognizes it (not as cbododatki.column type) and performs the calculation.
I have a form call "frmemployee" that holds employee's details. I have page tabs with sub forms on and the one I'm now concentrating on now at the moment is a Sub form called "medical Sub form" this holds data regarding the last medical the employee has had on continuous form e.g. MedicalDate ,Doctor , Place
now what I'm trying to do is find last medical date for the employee selected and add +730 days to show next medical date in text box on the footer of the subform
I have a sample with bubble speech show what I'm try to do
I have a form that shows data from tables tbl_AgencyInfo, and a subform showing data from tables tbl_CourseInfo & tbl_StudentInfo. Each agency can have mutliple students and multiple courses, so that is why it is set up this way.
My subform will only display one record at a time, however, even though there are multiple students/coursess that relate to the agency. I am thinking something is off with my relationships but I'm not totally sure. In previous databases I have linked my tables together in a central table, but that table in this case does not seem to be populating.
I have one table containing all neccessary detail of members of varius soceity
I create a query to find name of all society(ies) for one person
When i create a form to the that query it show all record in form view,datasheet view but when i insert this form as sub form in other form it shows only first record.
main form and subform not connected each other as main form linked with table and subform with query
I have two tables, tblAdmin (which contains my attachment field, a logo) and tblRecords (which contains customer records.I created a form (frmMain) that displays customer records, and hooked frmMain to qrySelectCustomer, which is a query that... you guessed it!... selects a particular customer to view. I wanted the logo to appear at the top of this form, but it's in a separate table. I need to allow the database owner to go in and swap out one logo for another whenever he wants (if the business changes or whatever) and all my subsequent forms/reports have to pull this logo.
I can't use any kind of DLookUp for the image/attachment, because DLookUp only fetches text not images, so what I did was create a subform called frmLogo and hooked the subform to tblAdmin where the attachment resides. It works perfectly when I just open the frmLogo, the image displays as it should. But when I open frmMain, I get a parameter value prompt because it can't find the image! Even though the subform frmLogo that's on frmMain is hooked to the correct frmAdmin table!
I tried several things, but the only thing that solved the problem was to ALSO hook frmMain to tblAdmin, which I do NOT want to do, because then I have to create a THIRD form for the customer data and hook THAT to qrySelectCustomer!
I have a form that contains a number of tabs, each tab then contains a subform. The basic gist is that there are clients and each client chart needs to be audited to make sure that the every clients chart has all of the correct information in it. So if for example, each client needs an initial treatment plan, there would be a tab called Initial Treatment Plan that would contain a subform (continuous form) displaying all of the clients that are missing this information.
I would like to display the number of records that are being displayed in each subform in the tab next to the name to make it easier for the auditor to know how many which tabs have content to be updated. For example, if there are 10 clients that are missing their initial treatment plan, the tab would read "Initial Treatment Plan (10)".
I was able to get a total number of rows in datasheet view, but I don't know if there is a way to have that field as a hidden field in continuous form view that can have its value displayed in the tab.
I have a blank form with a subform. All I want to do is have a combo box with the names of the subforms in, and when you choose one it is displayed in the subform box.
I'd like to display them more readable in the combo box, i.e. 'Duplicate Customers by Mobile Number'.I'd also prefer that the subform box is blank when the form is opened.
I have a main form and a subform. The main form displays the information as combo box = column.2 (in other words it shows the actual word not recorded y/n checkbox = obviously shows which is checked
However the subform shows
combobox = 1 or 2 etc the recordid y/n check box 1 for yes 2 for no
How do I get the subform to display the words instead of numbers? (can live with the Y/N)
have basically the same issue with a split form (combo only) shows words and datasheet view shows corresponding record id number
tried using =[coffeetype].[column.2] on both the subform and split form datasheet but doesn't work.
I am using Access 2010. I have a subform(continuous form) that I display as a datasheet and allow filtering. I display the record count by using Me.Recordset.RecordCount in the subform's form_current event. This value updates properly based on the column filtering except when the filtering displays 0 records.
When there are 0 records, the form_current event does not fire and I cannot figure out how to trap when this occurs so that I can display '0 records found'. How I can tell when the column filtering causes 0 records to display in the datasheet? Is there an event that fires when the user filters using the column headings arrow?
i have a form where i need to display the first 6 results (images). the information is comming from a subform which has all the information. also i need to know after pressing the "next" button how to display the next 6 images from the same subform and so on. using ms access 2013
I got a form / subform relationship.how to locate the bottom record, when the user after some queries input at the main form. I desire to display the bottom end record (EOF), instead of some sorting and display the last record at top of the subform!!
I am creating a database to manage multiple mobile devices. The table structure is complete and I'm trying to build a set of forms.
Simplifying things, I have tblUser, tblSim and tblDevice. I also have a tblJoin where you can select a UserID, SimID and DeviceID to create an item of inventory.
I have created a parent form (frmCreateInventory) base on tblJoin, so it has JoinID and combo boxes for UserID, SimID and DeviceID in the lefthand side.
I have also set up 3 sub forms sfrmUser, sfrmDevice and sfrmSim, based on their respective tables, which I want to display on the right hand side of frmCreateInventory.
I'd like to be able to create a subform control in frmCreateInventory, but change the subform it displays based on what combo box is clicked, e.g. if I click the UserID control, the subform displays sfrmUser, and the relevant data based on the UserID that is linked to the JoinID. if I click the DeviceID control, the sfrmDevice is displayed and the relevant info etc. etc.
Is this possible? if so, how would I go about doing this?
Is there a way to display/hide the information on a subform using a checkbox?So, when the checkbox is checked, the fields are blank but when the checkbox is unchecked, the information displays?
In Access 2010, if you have a form with a subform in datasheet view, and you move the focus away from the subform, how can you tell which record(s) on the subform are selected?
When the subform has the focus, the selected row is shown with a blue/grey tint. But as soon as the subform loses the focus, this disappears and all rows look identical.
Its an issue as I have 2 datasheet subforms on my main form, with the 2nd showing records related to the record selected in the 1st. But as soon as the 2nd subform receives the focus, it is impossible to see which record in subform 1 was selected.
I have tried conditional formatting, but that does not work.
I am having an issue with the sort order on a subform.
Basically I have a main form with Client Details and a subform hich displays the associated test results for this client. Each client can have multiple test results which should be displayed in date order.
Initially the form was based on the table 'TestResults' and I set up the form with the Orderby property set to the field 'TestDate' and OrderByOnLoad set to True. This didn't work and the records were displayed in random order.
Next I tried setting up the form based on an SQL query with the field 'TestDate' sorted in Ascending order - same result. Tried this with OrderBy and OrderByOnLoad both set/unset as a pair and individually - always the same result.
How can I get the subform to display the test results in date order?
I have an access form that displays some data about customers and their booking for flight. so lets say if there is a group of five people that made a booking for a certain flight, i have to assign ticket numbers to them and store it in some table.
Now i can display the number of people in a group for a certain flight in a subform, i want to have another textbox in front of their names so i can type in the ticket numbers. So i went to design view and added another textbox, but the problem is if the subform in displaying 5 rows (for 5 customers) when i type in a ticket number for one customer, all the following rows gets and displays the same ticket number. How can i type something and let it not be repeated infollowing rows.
i have a subform name(SUBSAL)in this subform i get reocrds for some employee as select combobox Name(CMBEMP).some employee having 2 record or some having 6 record as their transaction
i have sum of transaction at subform footer field but when only 2 records shows in subform it shows a major gap or blank space in subform detail section.
I am trying to get the main form to display a total Amount for all records in Purchase order details but the control displays Error:
I have a Form called frmPurchaseOrder with a sub-form sbfrmPurchaseOrderDetails
sbfrmPurchaseOrderDetails takes item details from a table based on what is selected in the combo box then fills out four additional fields in the same sub-form.
SELECT tblItemListDetails.ItemID, tblItemListDetails.ItemName, tblItemListDetails.ItemSize, tblItemListDetails.ItemUnit, tblItemListDetails.ItemUnitCost, tblItemListDetails.ItemBrand FROM tblItemListDetails WHERE (((tblItemListDetails.Supplier)=[Forms]![frmPurchaseOrders]![SupplierCombo]));
Private Sub cmbItemName_Change() Me.txtSize.Value = Me.cmbItemName.Column(2)
I would like to show a report's print preview in a sub form. Is there any possible way? I don't want the user to see the datasheet view of the table so I decided to put on a report.
I have a continuous subform which queries a table of attachments. I'm using Access 2007 but not using the Attachment datatype; this DB will grow considerably and I don't want to waste precious space by filling it with bulky files. So instead, I have code which makes a copy of the attachment and adds the hyperlink (to the copy) to the table instead.
Now - I want to add a control to the subform to display an icon / image reflecting the file type of the attachment (Word doc, Excel s/s, PDF etc.)
But not sure how to go about it.
I was thinking I could use FileSystemObject.GetFileExtension at the point in the code where the attachment is added, and add a new field to my attachments table (i.e. translate "*.xls*" to "Excel", etc.) Then store / embed a handful of images for the core types I would expect and use an image control on the subform to display the image based on the value of that field.
But is that even possible / feasible?
Or, is there a handy API which can retrieve the icon associated with a file type based on what has been installed on the local machine (even if there is, there's still the problem of setting up the image control to display the appropriate icon specific to each record...)
Or, is there another control available which would be better suited to something like this than an Image control?
I have a form, a couple of comboboxes and text boxes on it. When these are filled out, the SQL of a query is changed using these parameters.
There are three subforms on the form, all pivot charts, all based on the query being changed.
The goal would be to update all three according to the user-given parameters.
Right now the subforms only update if I close and open the form, which is probably not the best solution, since it's too slow.
I've also tried to requery and refresh them, with no result.
Then I tried to overwrite the recordsource of the subforms with the same text that was originally there. This got them to refresh their data, but then all of the charts disappeared and had to be built again, so this is a no go too.