Forms :: Refer To A Calculated Value In Unbound Control In A Form

Jul 19, 2015

In my DB i would like to make a form that displays different calculated values based on other forms and queries like income running cost etc., but i do not know how to refer in an unbound control to value of a control in another form. I get always #names? error. However it worked when loaded that form i refered to. Is there a way to do it without loading the refered form?

View Replies


ADVERTISEMENT

Forms :: How To Refer To A Control From Subform To Main Form

Feb 5, 2015

I have Main Form is named MainFrm and it has

two Sub Forms :
- OrdersSubFrm
- DetSubFrm

I want :

if OrdersSubFrm is not contains any records DetSubFrm is not enabled

View 7 Replies View Related

Forms :: Syntax To Refer To A Control On Nested Subform In Access 2013

Mar 20, 2014

I have searched to find the correct syntax to refer to a combo box control on a nested subform. All the examples I've found Access 2013 will not recognize or find the appropriate control.

I have a parent form called IncidentDetails. On that form I have a control called ctrlLogDetail. Within that control is a form called sfrm_LogDetail. On sfrm_LogDetail, I have a control called ctrlType which houses a form called sfrmType. On sfrmType, I have a combo box called cboType. I need to be able to place the cboType choice into a query to filter records for another combo box on that same form. the query works appropriately when I have sfrmType open, however as soon as I try to call the query from the IncidentDetails form, Access cannot find the cboType control.

I've tried multiple variations of the syntax to call to cboType that I've found online. I found a very useful reference from BTA Development: however the syntax there will NOT work in Access 2013.

What is the appropriate syntax would be to get to my control within my 3 deep nested subform? I'm working Access 2013 and won't have a choice regarding Access versions.

View 5 Replies View Related

Forms :: Form Calculated Control Using Calculations From A Query

Dec 18, 2014

All I'm after is, to sum in all records "where" reconcileDate (on the sub=form) = today in both the credit and debit fields and minus one from the other. I have a simple form and sub-form. On the sub-form I have a query based calculation that returns the following..."if ReconcileDate (on sub-form) = today, then show Debit value in yndebit" textbox..Likewise with the credit box, and all works perfectly fine.

However, I can't seem to sum these two boxes. Because the circled textboxes are query based, I've used the query as the control source (and not the text boxes) and all I get is an #ERROR? when placed in the form footer. I've tried to do this using the textboxes as the control source, and still nothing. I've tried to add a calculated control on the form itself, and still #ERROR? or #NAME? despite knowing exactly how to reference subforms within forms (this I've become quite an expert at as I simply use query design to make sure I have the correct path and control)anyway.

View 13 Replies View Related

Forms :: Unbound Control In Data Input Form - Auto Fill Leading Zeros

Apr 12, 2015

I have an unbound control in data input form requiring to input a 6-digit number. I have put a validation rule restricting more than 6 digits. Most users prefer to enter, say 123 and the system can enter the 3 leading zero for them.

View 6 Replies View Related

Refer To Previous Calculated Field

Jan 17, 2007

Access 2003.
I was just wondering if there was any way to refer to a calculated field in the same query.
For example if the first calculated field was - Total: ([Quantity])*([Price]), could you add another calculated field - Inc Tax: ([Total])*1.175.
At present I am having to type the whole formula in the calculated field again which seems to work for some queries, but not for others, no matter how I fiddle about with the syntax. The other way is to create another query and refer to my previous query. Both these methods seem extremely cumbersome and I was wondering if I have missed something with referring to a prior calculated field.
The query above is just an example, my query formulas are actually fairly long and for editing purposes it can be difficult to correct them.

View 4 Replies View Related

Forms :: Unbound Calculated Field - Show Results As Currency

Oct 16, 2014

I have an unbound calculated field [Txt1] that I would like to show the result as currency. The fields in the calculation are:

[CR] number, currency
[Commission1] general number, two decimal places
[Commission2] general number, two decimal places

The calculation is: CR15W * (1 - Commission1) * (1 - Commission2)
If I just set the field to currency it works fine. But I want the field to show the following:
"Some Text" & " " & Format(Calculation, "Currency")

When I tried to include the format it to currency I get type mismatch, run time error 13.

So I thought that perhaps I should try the following just to see where my error starts and I get the same error message when I use:

Dim Val1 As String
Val1 = CR15W * (1 - Commission1) * (1 - Commission2)
Txt1 = Format(Val1, "Currency")

Everything I have read says the formula is:

Format([Calculation], "Currency")

Is correct. So why won't it work for me?

View 8 Replies View Related

DESPERATE:cannot Refer To Subform Control

Nov 14, 2006

Still beating my head on the wall. I'm sure it is simple but I NEED guidance.

I've made a macro to show a date field when the "Yes" option button is selected and hide it when the "No" option button is selected. I first created it for the form to act on its own --> and it works. Now I want to use that form as a subform in the form [frmTestPkg]. I am having problems figuring out how to reference it properly as a subform.

Here's my macro that works when I attach it directly to my form:


Condition:[Forms]![frmsubcruiseplan]![CrPlRecvdNo].[OnGotFocus]
Action: SetValue
Item: [Forms]![frmsubcruiseplan]![CrPlSubmDate].[Visible]
Expression:No
Location: "On Got Focus" Event for the option button "No"

Condition:[Forms]![frmsubcruiseplan]![CrPlRecvdNo].[OnGotFocus]
Action: SetValue
Item: [Forms]![frmsubcruiseplan]![CrPlSubmDate].[Visible]
Expression:Yes
Location: "On Got Focus" Event for the option button "yes"

I have followed the pattern provided previously of

Forms![main form name]![subform control name].Form![control name]

but cannot get it to work -- obviously messing up somehow.

The reference I tried in the condition looks like this

[Forms]![frmTestPkg]![frmsubcruiseplan].[Form]![crplanrecvdNo].[OnGotFocus]

--> and with or without the setvalue information included I get a "The object you referred to as an OLE object isn't an OLE object" error.

Perhaps I am not identifying the subform control name properly? Or maybe I should be referring to the "Cruise Plan Recvd Option" instead of the individual control boxes (but it worked as a form)? Please spell it out for an idiot, what this is supposed to look like. Many thanks!

View 1 Replies View Related

Reports :: How To Refer To A Control On Subreport

Feb 12, 2014

I have a report with several subreports. I need to total the subreports onto the main report. How do I refer to the control on the subreport?I know that with a form / subform I would use: Me!Subform1.Form!Controlname.But simply replacing 'Form' with 'Report' doesn't seem to work.

View 1 Replies View Related

Using A String Concatenation To Refer To A Control Name?

Feb 28, 2015

know if there is a way to use a string concatenation to refer to a control name. eg. Referring to Control1, Control2, Control3, Control4, etc using something like Me.["Control" & "1"], Me.["Control" & "2"], etc

View 6 Replies View Related

Forms :: Formatting Calculation In Unbound Control

Sep 17, 2013

I have an unbound text box with the following control source:

="The scores below are based on the number of total evaluations (" & Sum([TitleIDCt]) & ")."

I set the formatting of the control to Standard. It reads:

The scores below are based on the number of total evaluations (1718).

I need the comma to show up so it reads like this:

The scores below are based on the number of total evaluations (1,718).

Can this be done?

View 6 Replies View Related

Forms :: Binding Unbound Control To A Table

Jun 4, 2013

I have a user form that has many unbound controls that are used as calculated controls that lead up to an unbound control that is the grand total of all the data entered. I would like for the unbound grand total control to update the grand total field in the table where I would like to store the data..is there a way I can bind an unbound control to a field in a table?

View 1 Replies View Related

How Rewrite Queryfilter To Refer To A Control In A Subform?

Aug 16, 2006

Hi!

I've developed a form to be standalone. It's based on a query with filter like this:

Like "*" & [Forms]![myForm]![Fltr1]

(The Fltr1 is a combox value.)

Now when i place the form "myForm" as a subform in another form (FormMain), the query does not give me any data.

How do i refer to the filter from the query??

Any help will be much appreciated!

thanks ;)

View 2 Replies View Related

How To Refer To Parent From Subform's Control Row Source

Oct 10, 2006

I have a main form with a subform. On a subform I created a combobox which I want to populate with ClassIDs that match the main forms Individual. I know the criteria in VBA for the above would look something like this:

"SELECT tblClassesAttended.ClassID FROM tblClassesAttended WHERE blClassesAttended.IndividualID=" & Me.Parent!IndividualID

but when I type such statement in the row source of the control it does not work. What is the correct way of refering to the parent form when typing the SQL in the row source?
BTW. I cannot use the main form's name

View 3 Replies View Related

Forms :: Unbound Object Frame Inside Tab Control

May 24, 2013

On a Tab Control inside a from, I've created an Unbound Object Frame, referring to an MS Excel Work Sheet. The goal here is to link that Unbound Object Frame residing on the Tab Control and save the form/link.

Now, when I execute the code, the Object Frame is linked and updated, but when I close the form, the link inside the Object Frame is not saved! However, when I do the exact same thing without placing the Object Frame on one of the pages of the tab, so as regular control inside the form, all works fine.

The code is as follows (performed when I click the button);"OLETest" refers to the UnBound Object Frame placed inside the first page of a Tab Control inside the form.

With OLETest
.Enabled = True
.Locked = False
.Class = "Excel.Sheet.12"

[code]...

View 2 Replies View Related

Tabular Form With Unbound Control

Nov 23, 2006

Hi,

Is it possible to have an unbound image control on a tabular form displaying a different image for each record ?

Actually i have tried putting some code on the onCurrent event, but it is displaying the same image in all records, depending on which record is current.

This is the code which i tried using:


Private Sub Form_Current()
On Error GoTo Err_Form_Current
If Not IsNull(Me.txtCountry) And Not IsNull(Me.txtCatalogueNumber) Then
Me.Stamp.Picture = Environ("userprofile") & "My DocumentsDatabasesPhilatelyStamps" & Me.txtCountry & Me.txtCatalogueNumber & ".jpg"
ElseIf IsNull(Me.txtCountry) Or IsNull(Me.txtCatalogueNumber) Then
Me.Stamp.Picture = Environ("userprofile") & "My DocumentsDatabasesPhilatelyStampsNotAvailable. jpg"
End If
Exit_Err_Form_Current:
Exit Sub
Err_Form_Current:
If Err.Number = 2220 Then
Me.Stamp.Picture = Environ("userprofile") & "My DocumentsDatabasesPhilatelyStampsNotAvailable. jpg"
Else
MsgBox Err.Description, vbExclamation, "Error #" & Err.Number
End If
End Sub

Actually, the above code works fine for Single Form, but not on tabular form.

Thank you for any advice.

View 2 Replies View Related

Forms :: Calculated Control Value Appears But Disappears

Nov 7, 2013

I have a calculated control on a form that is summing other controls and then a subtotal on a subform. This is access 2007

The calculated control does not display the value until I enter a value other then the default in all of the source controls. If I hit the "refresh" button, the value appears in the calculated control for a moment, then disappears.

I have set the default of the source controls to be 0, so none are null.

the calc control value does not stay until I put a value in the subform and its subtotal thus has a value

View 5 Replies View Related

Forms :: Storing Calculated Control Of A Subform

Jul 5, 2015

Eventhough i know calculated control are for queries, I still need to store a calculated value of a sum. I have a form with customers, dates, locations. That form has a subform that contains the services done and materials used. This subform is in datasheet view. In the footer i have a control with =Sum([Price]).

So I need the value of this control to be stored in the table the main form is based on. I did an unbound control in the main form where the =Me!Subform.Form!.Textx will bring the value "over" Then for the on focus event the vba code Me.Total=Me.Textx stores the value. That is fine. The same works with a command button with the same vba code.

However i am asking if there is a more automatic way to get the value over without the unbound control/command button.

View 7 Replies View Related

Forms :: Control Source From Calculated Query

Dec 5, 2013

I'm getting a Name(hash) error when I try to set up a control source to a calculated query.

I'd like to just be able to create a form and the write in the control source as it look neater (and it the right way to do it) then subforming a query for one text box.

I presently have tried in the expression build =[qryCallRunningAverage]![Average]

View 1 Replies View Related

Forms :: Refer To Specific Record In Continuous Form

Apr 15, 2013

I have a main form with a continuous sub-form. On the main form I have a series of text boxes that I want to use as a makeshift status bar. The text boxes would be filled in if a value was entered into certain records on my sub-form.The problem I have is since the sub-form is continuous, how would I refer to the specific record on the sub-form that I want to check for a value?

View 6 Replies View Related

Reports :: Unbound Control In Form Heading

Apr 2, 2013

I have a report that starts with an unbound form [Form1] which I need for the parameter inputs. Date1, Date2 and BillingMonth, all three are unbound controls. Date1 and Date2 are the criteria for the dates of billing and they work fine, that is, the query looks them up and the query runs fine. But I want to use the unbound control of BillingMonth to populate an unbound control in the report heading.

The control source is set as =[Forms]![Form1].[BillingMonth]; it works fine if the underlying [Form1] is still open. There is a command button on [Form1] that opens the report and then closes [Form1] since it is a pop-up form that is only used to get the criteria for the underling query; I don't want it to remain open when I run the report. However, the [BillingMonth] does not appear on the report heading. Just #Name?, which I assume means that since [Form1] is no longer open, it can't find the control [BillingMonth].

So, how can I get the [BillingMonth] to appear on the report heading?

View 3 Replies View Related

Calculated Control On Form Won't Save

Oct 4, 2004

Hi,
I am a first time user to access groups, so I am hoping for a
good experience.

I have a form which has a calculated control. But the calculation
shows on the form but is not storing in the record.

On the property sheet, the name is charge and the control source is
the calculation (=[source1]+[source2]...)

Why is it displaying but not storing? I do not know Visual Basic, so I would
like a solution that is simple if there is such a thing.

Thanks in advance,
Trainjoan

View 2 Replies View Related

Use DLOOKUp And Trim In Calculated Control On A Form

May 22, 2013

I am trying to use DLOOKUp and Trim in a calculated control on a form - D look up works but when i add Left trim to trim a telephone number to just the prefix - it wont work

=DLookUp("[CSP]","[Csp_Codes]","[Data] = '" & [Forms]![Application_Frm]![CommsData_tbl subform].[Form]![Data] & "'") - Works OK
=DLookUp("[CSP]","[Csp_Codes]","[Data] = '" & [Forms]![Application_Frm]![CommsData_tbl subform].[Form]![Left](Trim([Data]),7) & "'") - appears to put square brackets around Left ??

View 5 Replies View Related

Forms :: Refer To Combobox On Subform Within Navigation Form In Query Parameters

Jun 6, 2013

There is a command button on my form that calls a filtered query. I'm filtering the query based on a combo box within the form using

[Forms]![frmAssignDwgs]![Combo15]

It works beautifully until I put the form as a subform in the Navigation Form I'm using. When I execute it from within the Navigation form, it errors out looking for [Forms]![frmAssignDwgs]![Combo15].

Is there another syntax I can use so this will still work from within the Navigation Form? Or another way to approach this functionality?

frmNavigation is the main navigation form
frmAssignDwgToPkgs is the subform that holds Combo15

I found another thread (which I can't link to since I'm new) and tried various arrangements of the following to no avail.

[Forms]![frmNavigation]![NavigationSubform] .[Forms]![frmAssignDwgToPkgs]![Combo15]

View 3 Replies View Related

Tab Control With Subforms / "Can't Build A Link Between Unbound Forms" Error

Jan 23, 2007

I am trying to create a database for a cub scout pack that just keeps scouts information, medical info, parents info, and parents medical info each is a seperate table. I have created a Tab controlled form with 4 tabs. On each tab the ONLY thing I have is a subform that contains the appropriate information. Each table has it's own form with the table as it's record source. I link the scouts table to the medical table by SID which is a primary key in the Scouts table. I link the Scouts table to the Parents table with a PID which is the Primary Key in my Parents table, and I link the Parents with the ParentsMed with a PMedID, key in the ParentsMed table.

Question #1 - Using a Tab Control you can only have 1 record source. What should I use? I have tried the tblScouts and I have also created a query with every field from every table.

#2 - When I try to use the parent and child links on the subform I get the error "Can't build a link between unbound forms" but each form is bound to the table and the record source on the tab control has had a table and my qryEverything, neither work. I can type in SID but it still doesn't function properly.

Any suggestions or comments on a better relationship method or any insight on how tab controls are supposed to be setup or anything would be greatly appreciated.

Thanks a lot

Rick

View 4 Replies View Related

Query Display Value From Calculated, Unbound Textbox

Oct 5, 2007

Here's the situation.

I have a calculated value in an unbound textbox (avghcppmw). I want to run a query (qinsphistory) in which one of the fields is the value of the textbox (avghcppmw).

Is there any way to pull the value from the form and display it in the query. I'm assuming not.

I also assume the only way to do this would be to create a query that would calculate the textbox value and base (qinsphistory) on the newly made query.

Is this correct?

View 6 Replies View Related







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