1. The PI "number" is of type text (because we have leading zeros)
2. Totally not a primary key.
3. Form within is same form I want to open (Edit_Review_Status)
4. SELECT Report_Status.PI, Report_Status.[Other PI], Report_Status.[Report Type], Report_Status.[Project Manager]...
It appears that the MeUndo would clear the current form, thereby setting Me!PI to Null, and resetting the criteria to null, and then sending me to a null (blank) form. Is this an incorrect assumption?
That code works the same as previous, tells user of the duplication, and then opens blank, not the record they almost duplicated. I really appreciate all the help...
Dim Cri As String, DL As String
DL = vbNewLine & vbNewLine
Cri = "[PI] = " & Me!PI
If Not IsNull(DLookup("PI", "Report_Status", [PI])) Then
MsgBox "Review Status for PI # " & PI & " already exists." & DL & _
"You will now be taken to the record.", _...
Ok, I fixed this and now I go to a blank/new entry...
it appears to be doing "Me.Undo 'undo the duplicate PI." but not the "Me.Recordset.FindFirst Cri 'goto existing PI!"...
TheAceMan1:
I put in your code, no more 2501.. got a (3464) data type mismatch error in criteria expression error. Clicked debug, and it's highlighting the If statement...
VBA hates my guts :P
I had that (printer) issues earlier today - without having made this change yet, and it was resolved by changing the default printer. The printer's margins/paper size didn't agree with the print settings for my report.
Sorry 'bout that. I commented everything out because I was getting mad at it.
I was trying it another way at first, and it kept giving the same error, and when I fixed one thing, it'd give a different error, I'd end up reverting back to the original version (just by circular reasoning) and back...
I've been reading ya'lls threads on 2501 Open Form errors. I have been trying to implement what solutions I can (trying to modify them to fit my needs - obviously not well enough) and am still getting this error. Other errors make sense and are easy to fix, this one almost seems illogical. I do...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.