A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

calculated control in a form



 
 
Thread Tools Display Modes
  #1  
Old December 12th, 2006, 07:40 PM posted to microsoft.public.access.forms
Slez via AccessMonster.com
external usenet poster
 
Posts: 176
Default calculated control in a form

I'd like to show a sum of specific fields and calculated fields in a control
on a subform.

The subform that I want the totals to show on, frmBid, has a command button
which opens anther form, frmBidItems. That form contains 2 nested subforms:
frmQryBidLineItems & frmBidLineItemsSubform. The records/fields I want to
sum are in frmBidLineItemSubform.

The records in frmBid, which contains the controls, are in contiinuous view.

I have 2 basic questions:
1. How do I reference the desired records?
2. Can the control automatically recalculate when frmBidItems is closed?
Can that total be kept current with frmBidItems closed? (Obviously, I need
to figure out #1 before #2.)

If there are any examples or resources that contain similar expressions, I
would appreciate being steered in that direction.
Thank you!
Slez

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200612/1

  #2  
Old December 12th, 2006, 10:25 PM posted to microsoft.public.access.forms
Damian S
external usenet poster
 
Posts: 741
Default calculated control in a form

Hi Slez,

If the data you want is "on a form", it must be being stored in a table
somewhere. Simply grab the data out of the table directly rather than
attempting to reference a form that may or may not be open, eg:

=dlookup("FIELD1 + FIELD2", "TABLE", "WHERE_CLAUSE")

or maybe dsum, depending on the actual structure of data you are working with.

Hope this helps.

Damian.

"Slez via AccessMonster.com" wrote:

I'd like to show a sum of specific fields and calculated fields in a control
on a subform.

The subform that I want the totals to show on, frmBid, has a command button
which opens anther form, frmBidItems. That form contains 2 nested subforms:
frmQryBidLineItems & frmBidLineItemsSubform. The records/fields I want to
sum are in frmBidLineItemSubform.

The records in frmBid, which contains the controls, are in contiinuous view.

I have 2 basic questions:
1. How do I reference the desired records?
2. Can the control automatically recalculate when frmBidItems is closed?
Can that total be kept current with frmBidItems closed? (Obviously, I need
to figure out #1 before #2.)

If there are any examples or resources that contain similar expressions, I
would appreciate being steered in that direction.
Thank you!
Slez

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200612/1


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.