[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Compile error

Posted on 2014-01-03
2
Medium Priority
?
329 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 2000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

656 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