Access Custome Tab for Customer Page

James Coats
James Coats used Ask the Experts™
on
I am working on a custom Tab for the Customer page in this DB. I am getting an error that I am stuck on. It references code that is there but doesn't seem to see it.

The page crashes when opened.

CustomerDB.accdb
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
you have two functions with the same name in the form "frmCustomers" module

Private Function ShowLots()
DoCmd.OpenForm "frmLots", acNormal, "", "[fldOwnerID]=" & [fldCustomerID]
End Function

Private Function ShowLots()

    Dim varX As Variant
    varX = DLookup("fldOwnerID", "tblLots", "fldOwnerID = " & Me.fldCustomerID)
    If IsNull(varX) Then
        MsgBox "This Customer does not own a lot."
    Else
        DoCmd.OpenReport "rptCustomerLots", acViewPreview
        DoCmd.RunCommand acCmdZoom150

  End If

End Function

Open in new window

Commented:
VBA IDE has a debugger that should have picked this up. Debug > Compile
James CoatsComputer Info. Sys. Student

Author

Commented:
This solved one problem but now I have another. I will work some more on this tomorrow. Thanks for the assistance.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial