Problem With Total Of Sub-form Fields On Main Form

Nov 13, 2004

I'm trying to sum up the hours of a sub-form on the main form. I've followed the instructions in Access Help so far. I've created a text box in the footer of the sub form with the following control source:

=Sum([Mon])

which should sum up all the hours in HoursMon fileds.

Then I've created a text box on the main form with the following code in the Control Source

=[frmTshtProj Subform]!SumMon

But it doesn't work. I get a #Name? appear in the box instead of a total. Any ideas?

Thanks in advance

S

View Replies


ADVERTISEMENT

Subform Total To Show On Main Form

Jan 24, 2007

Hi ALl,

I have a subform that accounts and adds all the expenses for a certain project (for example, total is $27,000). I would like to know how to duplicate the final cost in the subform and show it on an unbound textbox of that linked main form (the unbound textbox in the main form shows $27,000 also).

Thanks in advance, guys...

Caliboi

View 4 Replies View Related

Forms :: Using Total From A Subform In A Sum In Main Form

Jul 8, 2013

I am trying to create a time sheet that enables my workers to fill out separate work orders and the hours from those Work orders are auto transferred to a sub form within their daily time sheet. I have gotten all this done and I have the total hours transferring to the main form but I need to use that transferred number in a new sum on the main form. I know that this cannot be easily done just by using the expression builder.

View 10 Replies View Related

Total Record In Each Query To Be Shown In Main Dashboard Form

May 23, 2013

I have a database with many Quires I want to create in the main form "welcome Form" many txt boxes cells

To show a total records in Each Quires

For Example I have the below list queries

Expired Employees PassportExpired Employees Work PermitExpired Employees VisasExpired Employees Insurance

In the "Welcome Forms" I will create a txt boxes Cells for Each one of those Queries to be Show only No "total Record in Each one". It is like a dashboard to monitor daily without opening the Report or Query...

View 3 Replies View Related

General :: How To Sum Amounts In List Box Column And Show Total On Main Form

Oct 19, 2012

How can I sum the amounts in the list box column and show the total on the main form?

View 2 Replies View Related

Forms :: Records Total On Main Form From Subforms - Run Time Error 2450

Apr 24, 2013

Trying to get a total on main form from records from two subforms.

I'm coming up with Run-Time error 2450 Microsoft Access cannot find the referenced form 'tblitemlist subform'.

View 3 Replies View Related

Forms :: When Subform Have No Records Then Total Field On Main Form Shows Error

Sep 1, 2013

In my database main form with subform. subform have query as recordsource.total of one of field in subform shown on main form. all is ok and show total correctly but when subform have no records then total field on main form shows #error. How to convert this value either into null string or zero(0).

View 2 Replies View Related

Replacing Running Total From Subforms Control To Main Form Table Field

Jun 11, 2015

I have an access form (Customer) along with a sub-form (Work_done). On sub-form I have Running sum of Amount in Text box-1. I want that Total of Running sum be replaced with Main form's tables field total_amount. Is it possible that we can replace an amount of control of sub-form into main form's field?

View 1 Replies View Related

Hide Fields In Main Form By Clicking Sub Form

Apr 11, 2005

I have one main form with 3 tabulated sub forms.
My main form consists of two fields.
When the user clicks tab 2 (subform 2) or tab 3 (subform 3) the main fields should hide

I tried to achieve this by using the on click event at the tabbed forms. I referenced the two main fields and used the visible property followed by a form requery. It didn't work.

thanks in advance

View 1 Replies View Related

Updating SubForm Fields From Main Form Fields

Jun 20, 2006

Hey Everyone,

I am stuck trying to figure out this problem. I have a main form "frm_tirelog_600" which has 4 combo boxes "cboleg",
"cbocar", "cbopos", "cboserial" on it. The first 3 combo boxes are used as criteria on 1 of 3 subforms that I have.
The fourth combo box "cboserial" is used for the criteria in a query on another subform that I have called "frm_mount_600_subform",
which is independant from the main form, I hope I have explained that clearly enough. What I need to be able to do is
have the subform fill in 3 of the fields on it "leg", "car", "pos" with the value from the 3 combo boxes on my main form. I
can get it to show in the fields but not write to the table. I have searched the forum and have not been able to locate anything
that would work and really need any assistance with this. Im not real strong in the coding department which is where I
beleive this could be done.



I have attached a copy of my DB which I hope will better explain it. Any help would be greatly appreciated

View 8 Replies View Related

Database With A Main Menu Form Containing A Button That Loads Main Data Entry Form

Jun 24, 2015

I have a database with a Main Menu Form, containing a Button that loads my main data entry form. When the Button is Clicked portions of the data entry form that is loading shows through the Main Form Background (e.g. portions of the navigation bars, and portions of the boarder on the form that is loading.)

View 5 Replies View Related

Why Is Main Form Update Event Triggered When Subform Dirties Main Form?

Dec 1, 2005

I have a subform which makes a change to a field on the main form. When focus is returned to the main form, the BeforeUpdate and AfterUpdate events fire. Why? I thought from the form's perspective, the subform is just another control.

BTW, I get the same behavior if I modify the field from within the Exit event of the subform control.

In either case, the main form's Dirty event is NOT triggered.

View 2 Replies View Related

Add Together A Running Total On Input Fields In A Form?

Aug 28, 2005

Hello, I have 4 input field boxes in a form: "basic hours", "overtime hours", "holiday hours" and "total hours" i would like it so that when the user enters number(s) into the other field(s) the total field will calculate (add togther the other fields). So for example if the user puts "10" in the "basic hours" input field and "5" in the overtime hours" field then the "toal field" will display the number "15". i would like it so that the "total hours" field calculates the total progressively after each number in the other fields is input (ie a running total is displayed). The user will always fill in basic hours but 1 or more of the other fields can be left blank. I think i need to do some VB on the after update procedure for each field entry but not sure what the code is?, any help would be brilliant.

View 7 Replies View Related

Linking Subform Fields To Main Form

Nov 22, 2006

Hi,

I have a form linked to a subform by an activity field, Both have a UID field also. I want to store the UID from the main form in each record in the subform. How do I link the two? I've done it before but cannot remember how and have been trying now for AGES! Any help would be much appreciated :)

View 2 Replies View Related

Select All Query Fields For Main Form?

Sep 13, 2013

I have a table with about 3800 records and about 150 fields. It also has 4 tables with related data that each have only one field. I am going to create a query to base my from from. Should I just take the star * and get all the fields for each table or should i manually specify them. There are only about 5 fields out of the 150 that I dont need and I need to see the rest.

View 13 Replies View Related

Forms :: How To Update Main Form Fields From Subform

Dec 7, 2013

This is an employee timekeeping database. I have a main form "frmTEMain", with a tab subform named "frmGridsub" with a tab named "Grid" on the lower half. On the tab page is the "frmGridsub" a continuous form that looks like a datasheet, many horizontal rows of data. The subform works correctly with several combo boxes that auto populate. There are many different employees listed in the Grid subform. "Employee" is the name used for the field that holds the unique ID number in the tables that feed the subform. The subform populates another table "dbo_BCRC."

When I click on a row in the subform I want fields to update on the Main Form with Employee, LastName, FirstName, that come from the table that was populated when data was entered into the subform. As the person clicks on the various rows in the subform, the main form fields need to synch with the row.

Do I use "Got Focus" event? Do I need to create another subform and place it on the top half of the Main Form?

I can provide screen shots....

View 1 Replies View Related

Conflicting Requirements Between Popup Forms And Main Form's Fields

Jan 23, 2006

I have set certain fields on my main form to be required to protect from accidnetal skipping which has occured in past. However, in middle of form, there are a group of checkboxes, which opens their correndsponding popup forms for more details. Right now, I get an error if it try to pop up a form because not all required fields are filled in.How do I make Access suspend the requirments whenever the checkboxes are checked and additional info are being inputed?Edit= tried setting it as dialog boxes, but to no avail.

View 9 Replies View Related

Forms :: How To Populate Subform Fields When Drop Down Selected In Main Form

Mar 12, 2013

I have built a form that holds details of training records. What I want is when a drop down is selected in the main form, that it will populate some of the fields in the subform. I have this working at the moment, that for example, when a certain course is selected, that their modules will appear in the subform. Where my problem arises is that I have a relationship between two tables that I want to appear on the subform, so that details can be filled in on the subform against the list of modules that automatically appear.

View 2 Replies View Related

Forms :: Send Data From Pop-up Form To Main Form (sub-sub Form)

Aug 27, 2014

On the form: User enters first name, then last name. Upon updating the last name field, I would like another form to pop-up and display all the people with that same first name and last name that the user just entered.

On the pop-up form: All of the matching first names/last names are listed with a button control beside each record that says 'Select'. The user clicks the select button beside the record he/she wants. This pop-up form closes and all of the data from this selected record is now showing on the original form.

So far, I have a query/form that pops up only showing the matching first/last names. I'm having a hard time getting my original form to auto-populate with that record that the user selects on the pop-up.

(Also my main form is actually a sub-sub form - so in my trials I could've been massacring my syntax trying to point to it.)

View 5 Replies View Related

Forms :: Open Blank Form Based On Value In Text Field In Main Form

Jun 6, 2013

I have one table containing name of restaurant with its address etc. Then i created another table to list out the restaurant workers names and details. Just as an example,

Table:Restaurant
Restaurant name
Address line 1
Address line 2
Restaurant #
Website

Table:StaffContact
Staff Role
Name
speciality
email
phone

I have the main form that has all the restaurant details only. And i have another form containing the Staff information. Please note the two table have a relation and it works well.

Now to make it user friendly(basically easier for the lazy ones), I dragged the staff contact form on to my main form and displayed it as a datasheet(basically a sub form).

Now, my boss does not want users to add/delete on this sub form(datasheet). So,he wants me to create buttons to open new record of staff for each restaurant(new form)

My issue is with opening a new record to enter a new person to the staff list and give them a role as well in form view.The new form has

So i ran a Macro, with open form with Where condition

Code:
[Staffcontact]![Rest Name]=[Forms]![MainForm]![RestaurantName]

But, it does not work .

View 2 Replies View Related

General :: Clear Sub Form At The Time Of Opening The Main Form?

Jul 24, 2013

I have a form, which is comprised of a sub form, and some of the text box controls sided with a button, and the event had been written to the button.

Now, to give a note on how had the sub form had been created is firstly taking a clone of the "Payments" table and using it as a datasheet, and then create a sub form in the form, it works fine

View 2 Replies View Related

Forms :: Main Form Which Contains A Sub Form In Data Sheet View

Nov 28, 2013

I have a main form (tsTimeSheetMain) which contains a sub form (tsTimeSheetDataNewSub) in data sheet view. When I click off one row onto another row in the sub form, it triggers this code:

Forms!tsTimeSheetMain!ProjectMonSum.Requery

i.e. it tries to requery the ProjectMonSum field (on the main form) which is a dsum calculated field. This works fine and updates the ProjectMonSum field (which dsums values from the same datasource as the subform.

However, this seems to put the cursor back to the top left field in the subform (datasheet view), rather than leave it in the field I click on (in the subform).

Why is this happening and what is a decent workaround this issue? I just want to update the calculated dsum field each time you update values in the subform.

View 8 Replies View Related

MsgBox Closing Main Form Then The Correct Form?

Aug 25, 2005

Hi all,

I've added a message box to what is basically a standard simple to use access control, "closeForm", I'm a newbie working on learning access vb. I'm guessing my code if fudged. Any help is greatly appreciated.

Private Sub Close_Click()
On Error GoTo Err_Close_Click
Dim Answer As Integer
Answer = MsgBox("Press Ok to Close, Cancel to Continue.", vbOKCancel + vbQuestion, "Exit Data Entry?")
If vbOK Then DoCmd.Close

Exit_Close_Click:
Exit Sub

Err_Close_Click:
MsgBox Err.Description
Resume Exit_Close_Click

End Sub


Thanks to all in advance

View 5 Replies View Related

Use Popup Form To Select A Record On Main Form

Sep 2, 2006

I'm not sure how to search on this, even in the advanced search. If this has been answered, could you point me in the right direction?

I have a main form AddNewCompany (the infamous tab control that now works - thanks to your combined efforts). On it I have a command button that pops up a form of continuous forms with all the companies in the table (the query calls the CompanyID and CompanyName fields only). I have attached an image of the interface.

This means the user can see if the company already exists and doesn't enter it again. (I'm sure there are more effecient ways of doing this, but this is simple and it works. I also know key fields should be autonumbers instead of text, but I have reasons for doing it this way).

What I would like to be able to do is click on the CompanyID field and have the companies information show up in the main form.

View 14 Replies View Related

Use Popup Form To Select A Record On The Main Form

Sep 4, 2006

Can anyone see what I am doing wrong?

I have a main form that has a tab control on it. The main form is called frm_AddNewCompanyContacts. It is opened in edit mode. To see if a company exists I use a command button to call a popup form with a list of all companies' IDs and names. I then want the user to be able to click on a commad button on the popup form to take the main form to that record. After an intial post, and subsequent search, I found the appropriate code. This is what I am using for the onclick event of the command button on the popup form:

Private Sub cmdGoToCompany_Click()
Dim rst As Recordset
Set rst = Forms![frm_AddNewCompanyContacts].RecordsetClone
rst.FindFirst "[CompanyID]='" & Me![CompanyID] & "'"
If rst.NoMatch = False Then
Forms![frm_AddNewCompanyContacts].Bookmark = rst.Bookmark
End If

End Sub

When I click on the command button I get an error message:

"The expression On Click you entered as the even property setting produced the following error: A problem occurred while Microsoft Office Access was communication with OLE server or ActiveX Control (I don't have an ActiveX Control).

*The expression may not result in the name of a macro, the name of a user-defined function, or [Even Procedure].
*There may have ben an error evaluating the function, event or macro."

View 10 Replies View Related

Need Code To Open TeacherDetailFrm Form Main Form.

Jun 11, 2007

Hi
I need code to open TeacherDetailFrm form Main form.

I have TeacherStudentSubFr*m on the Mainform, FirstNameTxt on the TeacherStudentSubFr*m, and TeacherDetailFrm.
I need code to open the TeacherDetailFrm By double click on the FirstNameTxt.

I use this code but no data come and query dialog box come.

Private Sub FirstNameTxt_DblCli*ck(Cancel As Integer)
Dim DocSubForm As String
Dim DocText As String
DocSubForm = "TeacherDetailFrm"
'DocText = "[Result]=" & "'" & Me![result] & "'"
DoCmd.OpenForm DocSubForm, , , "[ FirstNameFld ]=forms![TeacherStudentSubFrm]![ FirstNameTxt]"

End Sub


I like to upload the file but no way in this forum

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved