bobbobruns12
Technical User
I have a form that I am using Docmd to open which applies a filter for me to open only certain records. I have never had a problem until recently but suddenly now I click on the cmd button for the form and it gives me the error message "OpenForm Action was cancelled." On my backup database my code works perfectly, just with the new one (the one with all the updated info on it) I am continuing to have this error. I have tried to import the form from the other database thinking that there is a code glitch however it still leaves me with the same problem. My code looks like
Private Sub AddPlayerscmd_Click()
On Error GoTo Err_AddPlayerscmd_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "AddPlayersEntryfrm"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 'saves record
strAddFilter = " APTransID = " & Chr(34) & Me.TransDataEntryTransIDtxt.Value & Chr(34)
DoCmd.OpenForm stDocName, , , strAddFilter, , , "Me.TransDataEntryTransIDtxt"
Exit_AddPlayerscmd_Click:
Exit Sub
Err_AddPlayerscmd_Click:
MsgBox Err.Description
Resume Exit_AddPlayerscmd_Click
End Sub
And on the form I have:
Private Sub Form_Current()
Me.AddPlayersTransIDEntrytxt = Me.OpenArgs
[AddPlayersIDEntrytxt] = Forms![TransDataEntryfrm]![TransDataEntryIDtxt]
End Sub
I feel like I've tried anything and I'm really against a wall. If anyone could help I'd really appreciate it. Thank you
Private Sub AddPlayerscmd_Click()
On Error GoTo Err_AddPlayerscmd_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "AddPlayersEntryfrm"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 'saves record
strAddFilter = " APTransID = " & Chr(34) & Me.TransDataEntryTransIDtxt.Value & Chr(34)
DoCmd.OpenForm stDocName, , , strAddFilter, , , "Me.TransDataEntryTransIDtxt"
Exit_AddPlayerscmd_Click:
Exit Sub
Err_AddPlayerscmd_Click:
MsgBox Err.Description
Resume Exit_AddPlayerscmd_Click
End Sub
And on the form I have:
Private Sub Form_Current()
Me.AddPlayersTransIDEntrytxt = Me.OpenArgs
[AddPlayersIDEntrytxt] = Forms![TransDataEntryfrm]![TransDataEntryIDtxt]
End Sub
I feel like I've tried anything and I'm really against a wall. If anyone could help I'd really appreciate it. Thank you