473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Setting a flag on a subform as a result of a calculation on it's own subform.

Thank you for being here.

I've bashed my head without help so far, but I'm rapidly running out of time and could use a hand. I don't think it should be too difficult for an experienced Access person.

My structure is I have a "client" form with an "order" subform with an "order details" subform to that.

Client
>Order
>>Order details

The "Order details" subform calculates how many items are yet to be picked up and transfers that number to it's parent subform "Order". One of the fields of the "Order" subform is "Order complete". The "Order complete" checkbox should be set as soon as the value transferred from the "Order details" subform becomes zero and cleared if it is no longer zero.

I don't care if the "Order complete" field on the "Order" subform is activated from the value in the "Order details" subform (=Count([Picked Up])+Sum([Picked Up])) {preferred for elegance} or from the temporary transferred value in the subform "Order".

I've tried lots of things and now need some advice. It takes a village to raise a programmer.

Thanks,
Dave Ussell
Dec 18 '06 #1
3 1730
MMcCarthy
14,534 Expert Mod 8TB
Thank you for being here.

I've bashed my head without help so far, but I'm rapidly running out of time and could use a hand. I don't think it should be too difficult for an experienced Access person.

My structure is I have a "client" form with an "order" subform with an "order details" subform to that.

Client
>Order
>>Order details

The "Order details" subform calculates how many items are yet to be picked up and transfers that number to it's parent subform "Order". One of the fields of the "Order" subform is "Order complete". The "Order complete" checkbox should be set as soon as the value transferred from the "Order details" subform becomes zero and cleared if it is no longer zero.

I don't care if the "Order complete" field on the "Order" subform is activated from the value in the "Order details" subform (=Count([Picked Up])+Sum([Picked Up])) {preferred for elegance} or from the temporary transferred value in the subform "Order".

I've tried lots of things and now need some advice. It takes a village to raise a programmer.

Thanks,
Dave Ussell
Firstly, i need to know more about the makeup and structure of the order details subform and where this 'value' is stored and/or what it is calculated on exactly.

Secondly, there has to be some trigger to change the order complete status. By that I mean something happens that causes the check to be run on the value.

Can you post the code etc. that you are currently using for all these procedures.

Mary
Dec 19 '06 #2
Thank you for your response.

Not being very sophisticated there really is no code.

This is what happens. There are three tables involved "Order details", "Orders" and "Customers" with the appropriate one of many links. The form and subforms based upon these tables are "subfrmOrderDetails", "subfrmOrders" and "Customers" respectively. All of the data manipulation works fine however, I need to print reports that sometimes only address incomplete orders and other times only completed orders. Therefore, they need to be differentiated. To do this I have a field in the "Orders" table called "Order complete".

In the "Order details" table there is a checkbox that maintains the picked up status. It is checked when each line item (record) is picked up since they may, or may not, all be picked up at the same time. In the form footer of "Order details" there is a local field called "PickedUpCount" which contains the formula =Count([Picked Up])+Sum([Picked Up]) as it's control source. By design this value is zero when no more items are available for pickup.

As a temporary test "probe" on the "subfrmOrders" I have placed a temporary text box named "ToBePickedUp" with the formula =[subfrmOrderDetails].[Form]![PickedUpCount] for the Control Source. This also works fine and merely indicates how many line items (records) are yet to be picked up. The only part of this that I can't seem to decipher is how to set the "Order complete" field on the "subfrmOrders" when either the "PickedUpCount" on "subfrmOrderDetails" or "ToBePickedUp" on "subfrmOrders" equals zero (they track and are really the same field but it would be more elegant to use "PickedUpCount" on "subfrmOrderDetails" because that would make the other superfluous).

In short we have
Customers
>Orders ----- w/field "Order complete" set/unset when the count below is 0
>>Order details ----- Contains and passes # of items remaining to be picked up

I know I do not speak the language well. If you want to see the beast you can do so at ftp://ascii27.com/Siesels.mdb

Incidentally, I forgot this is implemented in Access 2000 in case it makes a difference.

Sincere thanks,
Dave
Dec 19 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
Dave,

I've made some changes and it should work for you now. Let me know if you have any problems or don't understand what I've done. The calculated fields are gone and there is an event trigger on the checkbox in the order details subform written in vba.

Siesels_Revised.mdb

Mary
Jan 1 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: John Hargrove | last post by:
I'm having trouble setting decimal place values in the results field of a sample management database I'm building for an environmental testing laboratory. The degree of sensitivity varies among...
9
by: chris vettese | last post by:
On my subform I have a field in the footer that totals the value of a field. On the main form I have referenced this field. I'm using this field in a calculation on my main form. The problem...
1
by: gavo | last post by:
Hello everyone! Using A2K i have a form(a) with a subform(b) and within the subform there is a continuous subform(c). in the subform (b) there is a command button used to call a public...
4
by: Spencer Lee | last post by:
Hi all, I really need some helps. I created a main form("category"), which contains a subform1, "Part". Inside this subform also has contains a subform2, "Inventory". The second level of...
1
by: aharding | last post by:
I have a form that displays data. I have a subform I created in the form, saved, deleted from form layout, and a command button that opens that subform. It works perfectly until I try to enter the...
0
by: =?Utf-8?B?UnVkeQ==?= | last post by:
Hello all! I have a textbox that hold a numeric value in it. Getting this value from SQL. If the value goes up, I need a message box to pop up. But I also I have another text box that you will...
1
by: Colin Clark | last post by:
Hello, I have a database of scores for a sports club. I want to display a continuous subform showing a person's scores for the season along with a running calculation based on those scores (the...
4
meLady
by: meLady | last post by:
Hello, I have a form called feedback with a subform called feedback Options. I did some counting calculation in master form "feedback" at the bottom page. the calculation is about count the...
1
by: xwjcity | last post by:
Hi everyone: I am new here and I got Calculation problem. thanks in advance.. I have four subforms which retrieve data from different four tables. I created a textbox to do a calculation with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.