Hi all,
Some more questions on the project I'm working on.
I have an Order Details form that contains two subdatasheets. One for Line Items and the other is for Shipments. Each order can have multiple line items, and each line item can have multiple shipments. How it is set up now, when you click/select a line item row it will display the corresponding shipments.
I would like to add some kind of visual indicator when a line item has been fully shipped. I could probably do this by adding another calculated field to my line item query or another text box on my main form, but its getting a bit full and I don't want the user to have to horizontally scroll to see info.
I thought maybe I could use conditional formatting to change the color to visually signify this to the user. I've not really used conditional formatting much in access so I'm not sure if what I want to do is not possible or if i'm doing it wrong. In my searches, I also seen a few people recommended changing the subform to continuous and then placing a colored box behind the controls that turns visible when the conditions are met. I would like to see if its possible to do what I want with datasheets before I redesign my subforms.
Database info
Main Form: frm_OrderDetails
Subform 1: subf_LineItems
Subform 1 control: ctr_LineItems
Subform 2: subf_Shipments
Subform 2 control: ctr_Shipments
On the subf_Shipments form, I have a text box in the footer called ShipTotal with the following as the Control Source:
For my conditional formatting, I am trying to compare LineQty from the ctr_LineItems with the ShipTotal from ctr_Shipments. If the values are equal, it will highlight a field in ctr_LineItems. Here is the expression I have:
Now, this somewhat works. In my sample data I have 3 line items, two of which I've completed shipments on. This conditional formatting will change the first line item to the desired highlight but not the second. If I select the second line item and hit apply, it will apply the highlight but remove it from the first line item.
Any ideas?
Some more questions on the project I'm working on.
I have an Order Details form that contains two subdatasheets. One for Line Items and the other is for Shipments. Each order can have multiple line items, and each line item can have multiple shipments. How it is set up now, when you click/select a line item row it will display the corresponding shipments.
I would like to add some kind of visual indicator when a line item has been fully shipped. I could probably do this by adding another calculated field to my line item query or another text box on my main form, but its getting a bit full and I don't want the user to have to horizontally scroll to see info.
I thought maybe I could use conditional formatting to change the color to visually signify this to the user. I've not really used conditional formatting much in access so I'm not sure if what I want to do is not possible or if i'm doing it wrong. In my searches, I also seen a few people recommended changing the subform to continuous and then placing a colored box behind the controls that turns visible when the conditions are met. I would like to see if its possible to do what I want with datasheets before I redesign my subforms.
Database info
Main Form: frm_OrderDetails
Subform 1: subf_LineItems
Subform 1 control: ctr_LineItems
Subform 2: subf_Shipments
Subform 2 control: ctr_Shipments
On the subf_Shipments form, I have a text box in the footer called ShipTotal with the following as the Control Source:
Code:
=Sum([QtyShipped])
For my conditional formatting, I am trying to compare LineQty from the ctr_LineItems with the ShipTotal from ctr_Shipments. If the values are equal, it will highlight a field in ctr_LineItems. Here is the expression I have:
Code:
[LineQty]=Forms!frm_OrderDetails![ctr_Shipments].Form!ShipTotal
Now, this somewhat works. In my sample data I have 3 line items, two of which I've completed shipments on. This conditional formatting will change the first line item to the desired highlight but not the second. If I select the second line item and hit apply, it will apply the highlight but remove it from the first line item.
Any ideas?