Solved

Compile error

Posted on 2014-01-03
2
326 Views
Last Modified: 2014-01-04
I am trying to modify the code in this article on staging data to suit my database needs.  http://www.experts-exchange.com/A_6692.html  When I run the code I get a compile error.  The form is tempServices.  Select a sample number, select a category then click Load Services - that's where the error comes up.  I am uploading a data stripped version of the front and back end if someone would like to have a look at it.

I am also wondering how to modify the code to select all categories and then load ALL services?
Thanks!
NBDC-be.accdb
NBDCv203.accdb
0
Comment
Question by:esbyrt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
Bitsqueezer earned 500 total points
ID: 39755849
Hi,

that thing is full of errors. The first thing you'll need to do is to add an "Option Explicit" at the top of EACH module (modules, form modules, report modules) where it is not already there. Then use "Debug"-"Compile" in the VBA editor and correct each error it presents, in all modules. My first quick try to do that throws several errors in several modules. I don't think that anyone else has the time to completely rework your database to get at least a running one (or at least your problematic form). The form with the compile error has for example a missing "End Sub", a missing jump label, a recordset where you try to access the field with "." instead of ! (or at least .Fields("Name")), the backend could not be connected completely as there are missing tables in the table manager, the problematic form throws an error of a missing table, and, and, and...

Last but not least: Please write the used Access version into any question so it is easier for the experts to decide if they download it or not. In your case it is A2010 which makes it impossible to use your demo database with a lower version.

In general it looks as if you would have copied and pasted the code of another database without changing field names and so on to fit your needs.

Cheers,

Christian
0
 

Author Comment

by:esbyrt
ID: 39756433
Hi Christian.  Thanks for taking a look.  I'm sure part of the problem is that I was trying to post as little as possible of my working database onto the internet for public access.  I must have left out some tables.  And yes, I did copy the code for the problem form from a demo database and change the field and form names to match my database.  I guess I will have to go through and correct the errors you spotted before I can go further with it.
Thanks again.

Edit - had another look at my database - most of the problems you found were from a form I was mucking around with and had discarded but not deleted yet.  My bad.  I will clean this up and repost after.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question