Solved

Compile error

Posted on 2014-01-03
2
319 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
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now