Solved

Compile error

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

Technology Partners: 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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

735 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