I'm sure it has something to do with the address of the criteria.
I have a form with a subform and and within that subform I perform the following
The SQL for the query "UpdateDDSchedCompletedQry is
UPDATE DdSchedules SET DdSchedules.Status = "Completed"
WHERE (((DdSchedules.DdSchedId)=[Forms]![DdCreateABAFileFrm]![DdPaymtTransDueSubform].[Form].[DdSchedId]));
Each time I run this query it asks me to enter the DdSchedId
DdCreateABAFileFrm - is the Parent form
DdPaymtTransDueSubform - is the child subform
Even if I put in the value of DdSchedId into the query it doesn't work. It displays the field with the old contents
Any help would be appreciated
I have a form with a subform and and within that subform I perform the following
Code:
Me.PaymentFeeFld = DLookup("PaymentFee", "DdSchedules", "[DdSchedId] = " & DdSchedId)
MsgBox "The PaymentFee = " & Me.PaymentFeeFld & " The Schedule Id = " & DdSchedId
If Me.TotOwedFld <= 0 Then
MsgBox "The Total Owed Amount is <= to zero " & vbCrLf & "The system will change the status to Completed. Change the Include Checked box to Off." & vbCrLf & "No other payments will be attempted on this schedule"
DoCmd.SetWarnings False
DoCmd.OpenQuery "UpdateDDSchedCompletedQry" '--- Change the schedule status to Completed.
DoCmd.SetWarnings True
The SQL for the query "UpdateDDSchedCompletedQry is
UPDATE DdSchedules SET DdSchedules.Status = "Completed"
WHERE (((DdSchedules.DdSchedId)=[Forms]![DdCreateABAFileFrm]![DdPaymtTransDueSubform].[Form].[DdSchedId]));
Each time I run this query it asks me to enter the DdSchedId
DdCreateABAFileFrm - is the Parent form
DdPaymtTransDueSubform - is the child subform
Even if I put in the value of DdSchedId into the query it doesn't work. It displays the field with the old contents
Any help would be appreciated