?
Solved

What is the correct syntax?

Posted on 2011-09-11
6
Medium Priority
?
253 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
[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
  • 4
6 Comments
 
LVL 75

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 46

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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

770 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