Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
del record function
jannette j 
    
8 years ago
ave this routine that take the data from a temp form and moves it into another ProjectForm.

After it moves the data it deletes the data from the temp table and form .

The code is

Private Sub cmdMove_Click()
    'DoCmd.Save
    Dim db As DAO.Database
    Dim rec, rec2 As DAO.Recordset
    Dim ProjNorec As Integer
    Set db = CurrentDb
    Set rec = db.OpenRecordset("TrackerProjectNoTemp", dbOpenDynaset, dbSeeChanges)
    Set rec2 = db.OpenRecordset("TrackerProjectNo", dbOpenDynaset, dbSeeChanges)
    If IsNull(Me.TDueDate) Then
        If Me.TProjectApproved <> "Yes" Then
            MsgBox " Please enter the due date and Yes option in approved field before approving...", vbOKOnly, "New Project to be approved"
            Me.TDueDate.SetFocus
        Else
            MsgBox " Please enter the due date before approving...", vbOKOnly, "New Project to be approved"
            Me.TDueDate.SetFocus
        End If
    Else
        If Me.TProjectApproved = "Yes" Then
            rec2.MoveLast
            recid = rec2("ProjectID")
            recid = recid + 1
            rec2.AddNew
            rec2("ProjectNo") = recid
            rec2("DateSubmitted") = Me.TDateSubmitted
            rec2("DateEntered") = Me.TDateEntered
            rec2("TechAssigned") = Me.TTechAssigned
            rec2("Requestor") = Me.TRequestor
            rec2("Department") = Me.TDepartment
            rec2("Manager") = Me.TManager
            rec2("ContactNo") = Me.TContactNo
            rec2("AreaAffected") = Me.TAreaAffected
            rec2("ProjectOverview") = Me.TProjectOverview
            rec2("Notes") = Me.TNotes
            rec2("DueDate") = Me.TDueDate
            rec2("CompletedDate") = Me.TCompletedDate
            rec2("TestDate") = Me.TTestDate
            rec2("ProdDate") = Me.TProdDate
            rec2("Application_Name") = Me.TApplication_Name
            rec2("Processor_Name") = Me.TProcessor_Name
            rec2("ProjectStatus") = Me.TProjectStatus
            rec2("ProjectApproved") = Me.TProjectApproved
            rec2("active_project") = Me.Tactive_project
            rec2.Update
            If Not (fDelCurrentRec(Me)) Then
                MsgBox " New Project Request been Approve...", vbOKOnly, "New Project"
                Me.TempProjNo.SetFocus
                TTechAssigned.Enabled = False
                TDateSubmitted.Enabled = False
                TDateEntered.Enabled = False
                TRequestor.Enabled = False
                TDepartment.Enabled = False
                TManager.Enabled = False
                TContactNo.Enabled = False
                TDueDate.Enabled = False
                TTestDate.Enabled = False
                TProdDate.Enabled = False
                TCompletedDate.Enabled = False
                TApplication_Name.Enabled = False
                TProcessor_Name.Enabled = False
                TProjectStatus.Enabled = False
                TProjectApproved.Enabled = False
                TAreaAffected.Enabled = False
                TProjectOverview.Enabled = False
                TNotes.Enabled = False
            End If
        Else
            MsgBox " This Project is not approved. Please Choose YES..", vbOKOnly, "Approved Project"
            Me.TempProjNo.SetFocus
            Me.Requery
            Me.Refresh
        End If
    End If
End Sub

but when it gets to  f Not (fDelCurrentRec(Me)) Then

I get an error  subfunction not define.

Can someone be kind enough to help me.


Reply from Alex Hedley:

what is fDelCurrentRec, is this in another module?

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/9/2026 1:40:09 PM. PLT: 0s