My first post: First off thanks to all those that answer questions on this forum. I’ve spent hours upon hours finding solutions and learning programming. I’d be stuck without you, so a big THANK YOU!!!!
I’ve spent a ton of time looking into this and haven’t found an answer so thought I’d finally post my own question:
I have a form with a continuous subform. The Subform has QtyOrdered Field(Entered on a different form), and QtyReceived Field (Entered on this continuous subform). What I want is for a third form to popup when Total Qty ordered – total QtyReceived = 0. I tried a query but ran into a problem where the table could not update. (Spent hours looking into this one as well, and couldn't find a solution)
As a work around I have an unbound text box named [QtyOutstanding] in the Subforms footer with a control source as follows: =Sum([QtyOrdered]-[QtyReceived])
On my main form I have an unbound text box named QtyZeroCheck with a control source as follows: =[ReceivingFormSubF].[Form].[QtyOutstanding]
Currently I’m simply trying to get anything to happen when QtyZeroCheck = zero.
I’ve put different types of code in different places trying to get a msgbox to popup if QtyZeroCheck = 0. Here is the most simple, where nothing at all happens.
Private Sub Form_AfterUpdate()
If me.QtyZeroCheck = 0 then
Msgbox “Finally working”
End if
End Sub
Any help for a frustrated rookie would be greatly appreciated.:banghead:
I’ve spent a ton of time looking into this and haven’t found an answer so thought I’d finally post my own question:
I have a form with a continuous subform. The Subform has QtyOrdered Field(Entered on a different form), and QtyReceived Field (Entered on this continuous subform). What I want is for a third form to popup when Total Qty ordered – total QtyReceived = 0. I tried a query but ran into a problem where the table could not update. (Spent hours looking into this one as well, and couldn't find a solution)
As a work around I have an unbound text box named [QtyOutstanding] in the Subforms footer with a control source as follows: =Sum([QtyOrdered]-[QtyReceived])
On my main form I have an unbound text box named QtyZeroCheck with a control source as follows: =[ReceivingFormSubF].[Form].[QtyOutstanding]
Currently I’m simply trying to get anything to happen when QtyZeroCheck = zero.
I’ve put different types of code in different places trying to get a msgbox to popup if QtyZeroCheck = 0. Here is the most simple, where nothing at all happens.
Private Sub Form_AfterUpdate()
If me.QtyZeroCheck = 0 then
Msgbox “Finally working”
End if
End Sub
Any help for a frustrated rookie would be greatly appreciated.:banghead: