nubianqueen
Technical User
Hi Guys,
This is the problem, I have a main form, when the user double clicks in the autonumber field a popup form comes up to enter comments associated with the current record. The code looks like this:
Private Sub Policy__DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "CommentsPopUpForm"
If Me.Dirty Then DoCmd.DoMenuItem acFormBar,acRecordsMenu, acSaveRecord, , acMenuVer70
stLinkCriteria = "[PolicyNum]=" & "'" & Me![PolicyNum] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
I changed the PolicyNum datatype from text to autonumber.
Now when I double click in the PolicyNum field on my form I'm getting a debug error. The last line of my code is being highlighted so I image that's where the problem is, just not sure how to fix it.
Any suggestions would greatly appreciated.
Thanks
nubianqueen
This is the problem, I have a main form, when the user double clicks in the autonumber field a popup form comes up to enter comments associated with the current record. The code looks like this:
Private Sub Policy__DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "CommentsPopUpForm"
If Me.Dirty Then DoCmd.DoMenuItem acFormBar,acRecordsMenu, acSaveRecord, , acMenuVer70
stLinkCriteria = "[PolicyNum]=" & "'" & Me![PolicyNum] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
I changed the PolicyNum datatype from text to autonumber.
Now when I double click in the PolicyNum field on my form I'm getting a debug error. The last line of my code is being highlighted so I image that's where the problem is, just not sure how to fix it.
Any suggestions would greatly appreciated.
Thanks
nubianqueen