Solved

What is the correct syntax?

Posted on 2011-09-11
6
208 Views
Last Modified: 2012-05-12
    If fld.Name Not Like "Report*'" And fld.Name Not Like "Lvl*" And fld.Name Not Like "PRV*" And fld.Name Not Like "CURR*" Then


I am getting a syntax error in VBA

Thanks
0
Comment
Question by:kosenrufu
  • 4
6 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 36520134
It looks like you've got an extra single quote in "Report*'". You can probably see it better below:
If fld.Name Not Like "Report*'" And fld.Name Not Like "Lvl*" And fld.Name Not Like "PRV*" And fld.Name Not Like "CURR*" Then

Open in new window

0
 

Author Comment

by:kosenrufu
ID: 36520158
I narrowed down the syntax to If fld.Name Not Like "Report*" Then

and still does not work
0
 

Author Comment

by:kosenrufu
ID: 36520163
It's

                If fld.Name Like Not "Report*" And fld.Name Like Not "Lvl*" And fld.Name Like Not "PRV*" And fld.Name Like Not "CURR*" Then

Like Not

But now I get a type mismatch when i run the script
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Accepted Solution

by:
kosenrufu earned 0 total points
ID: 36520172
I fixed it

It's If Not fld.Name Like "Report*" And Not fld.Name Like "Lvl*" And Not fld.Name Like "PRV*" And Not fld.Name Like "CURR*" Then
0
 
LVL 45

Expert Comment

by:aikimark
ID: 36520450
Is there an End If statement?
0
 

Author Closing Comment

by:kosenrufu
ID: 36991215
figured out
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

705 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

18 Experts available now in Live!

Get 1:1 Help Now