473,326 Members | 2,182 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,326 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 1723
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.