Advertisement

08.24.2007 at 06:18AM PDT, ID: 22784880
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

Visual Basic Syntax Error

Asked by jlnero in Microsoft Access Database, Visual Basic Programming

Tags: , , ,

In sharing a Microsoft Access 2002 application across a Mac OS based network, I found that the server was arbitrarily assigning a Feb 2040 create date to the file, which was preventing the database files from being seen and backedup by our back up software. I believe this is because the database was created on my home computer and copied here.

To solve the issue, I created a new database in the office, and imported all the tables, forms, etc. into the new database, with a correct create date. Everything seems to be here, except I am getting a

"The visual basic module contains a syntax error" message, referring to the following "ModMain" module:

Option Compare Database   'Use database order for string comparisons
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

There also seems to be some involvement of an AutoExec Macro, which invokes the following InvMain() function.

Global dbApp As Database
Global AppUser        'Will hold the log on staff id

Function InvMain()

On Error GoTo Err_InvMain_Click
    Dim username, result
   
'Set up the database
    Set dbApp = CurrentDb()
    username = GetAcUser()

    AppUser = DLookup("Staff", "Staff", "Staff='" & username & "'")
     
    If Not IsNull(AppUser) Then


       
'Opens the appropriate startup menu for the logged in user
        DoCmd.OpenForm "General Manager"
       
        GoTo Exit_InvMain
    Else
        CurrentDb.Execute "INSERT INTO Staff(Staff, FirstName) VALUES(" & Chr(34) & username & Chr(34) & ", " & Chr(34) & username & Chr(34) & ")"
        AppUser = username
        DoCmd.OpenForm "General Manager"
    End If

   

   
Exit_InvMain:
    Exit Function

    InvMain = True

Err_InvMain_Click:

    MsgBox Error$

End FunctionStart Free Trial
[+][-]08.24.2007 at 06:35AM PDT, ID: 19761994

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.24.2007 at 06:59AM PDT, ID: 19762191

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.24.2007 at 07:00AM PDT, ID: 19762205

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.24.2007 at 07:03AM PDT, ID: 19762235

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Access Database, Visual Basic Programming
Tags: syntax, error, basic, visual
Sign Up Now!
Solution Provided By: Clif
Participating Experts: 4
Solution Grade: A
 
 
[+][-]08.24.2007 at 07:13AM PDT, ID: 19762314

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.24.2007 at 08:02AM PDT, ID: 19762733

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.24.2007 at 08:14AM PDT, ID: 19762840

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.24.2007 at 02:02PM PDT, ID: 19765456

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.24.2007 at 02:09PM PDT, ID: 19765500

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.24.2007 at 02:20PM PDT, ID: 19765572

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.24.2007 at 02:27PM PDT, ID: 19765610

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628