I am expecting CTLFI as a boolean. When I run the query from VBA in form frmProcessAdjClaims I get asked for the value of CTLFI. When I run the query by itself I get asked for fraMode, which is fair enough, but then also for CTLFI, which appears to be defined already.

All Comments

SQL within Access

Access has a yes/no datatype, but I'm not sure it is a true boolean and will compare properly. Yet in this statement, you are inserting CTFL1, a boolean, into Something. Is Something defined as a Yes/No? If not, that may be the problem.

Is VendorID a field in the DB or on the form? I can't tell from this. If it is on the form, it isn't qualified properly with Forms!formname! etc and if it is in the DB, you may want to qualify with its table name. I.E zstblClaimsAdjStatus.VendorID.If it is a variable, make sure it is spelled properly esp. with case (VendorID vendorId VendorId [Vendor ID]). Make sure it is defined. If you are using brackets because there is a space in the name, you didn't put the space there.

SQL within Access

SQL within Access

First of all - You can't use a calc'd field (CTLFI) in a WHERE clause...

Use: WHERE (((IIf(Forms!frmProcessAdjClaims.fraMode=1,([VendorID] Is Not Null And [VendorID]>' '),([VendorID] Is Null Or [VendorID]=' ')))=True) AND ((zstblClaimsAdjStatus.BILLED_FLG)<>0))ORDER BY dbo_PROVIDER.NAME;

Start or search

Create a new discussion

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

Post type

Subject title

Topic Tags

Select up to 3 tags (1 tag required)

Cloud

Piracy

Security

Apple

Microsoft

IT Employment

Google

Open Source

Mobility

Social Enterprise

Community

Smartphones

Operating Systems

Windows

Mac

Malware

Tablets

Networking

Browser

Hardware

Software

Web Developerment

Linux

Off Topic

Message Body

Track this discussion and email me when there are updates

Please note: Do not post advertisements, offensive material, profanity, or personal attacks. Please remember to be considerate of other members. If you're new to the TechRepublic Forums, please read our TechRepublic Forums FAQ. All submitted content is subject to our Terms Of Use.