E
Emma Aumack
All of a sudden I am getting this error. We have been using this database
for 2 years and have not had a problem till now. I have not changed the code
at all. I have a subform that based on a selection from the user on a main
form, pops up. The pop-up form is based on fields from the same table as the
main form. What the heck could be wrong???
Iit is erroring on the first Me.Refresh, and if I comment out that
Me.Refresh, it errors out on the next Me.Refresh. Here is my code for the
Action field after update event:
Private Sub cbo_Action_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String
Me.Refresh
Select Case Me.Action
Case "Expire"
stDocName = "frm_Expired_Contract_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "Increase 5%"
stDocName = "frm_Exp_5P_Inc_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "Increase Other %"
stDocName = "frm_Exp_Other_Percent_Inc_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "No TM Extension"
stDocName = "frm_Extended_Contract_Details"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me.Refresh
Case "Pending LOC Extension"
stDocName = "Frm_Exp_Pending_LOC_Extension_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "Pending Approval Extension"
stDocName = "frm_Exp_Pending_Approval_Extension_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "Renew No Increase"
stDocName = "frm_Exp_Renew_No_Inc_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "Renew No Inc - New Contract"
stDocName = "frm_Exp_Renew_No_Inc_New_Cnt_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Select
End Sub
HEEEEEELLLLLP!!!
for 2 years and have not had a problem till now. I have not changed the code
at all. I have a subform that based on a selection from the user on a main
form, pops up. The pop-up form is based on fields from the same table as the
main form. What the heck could be wrong???
Iit is erroring on the first Me.Refresh, and if I comment out that
Me.Refresh, it errors out on the next Me.Refresh. Here is my code for the
Action field after update event:
Private Sub cbo_Action_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String
Me.Refresh
Select Case Me.Action
Case "Expire"
stDocName = "frm_Expired_Contract_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "Increase 5%"
stDocName = "frm_Exp_5P_Inc_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "Increase Other %"
stDocName = "frm_Exp_Other_Percent_Inc_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "No TM Extension"
stDocName = "frm_Extended_Contract_Details"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me.Refresh
Case "Pending LOC Extension"
stDocName = "Frm_Exp_Pending_LOC_Extension_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "Pending Approval Extension"
stDocName = "frm_Exp_Pending_Approval_Extension_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "Renew No Increase"
stDocName = "frm_Exp_Renew_No_Inc_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Case "Renew No Inc - New Contract"
stDocName = "frm_Exp_Renew_No_Inc_New_Cnt_Detail"
stLinkCriteria = "[Contract_No] = '" & Me![Contract_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Select
End Sub
HEEEEEELLLLLP!!!