User Profile
Collapse
-
Sorry but it's not liking anything I'm changing in the SQL. I keep getting all of these errors after I try changing the IIf function. -
OK. Let me start over. I go to my form and select a contract, department, location and report. I click on "View Report" button to hopefully see a report. I get the error message I posted above. I click OK out of the message and do Ctrl+g and get this in the Immediate error box:
Code:SELECT AGE, Count(IIf([N/I]='N',[N/I],'YES')) AS Non, Count(IIf([N/I]='I',[N/I],'YES')) AS Inst, Count(IIf([N/I]='O',[N/I],'YES')) AS Outpt, Count(ICN) AS
Leave a comment:
-
I'm still getting this error message. I thought I removed the time stamp.
Run-time error '3075':
Syntax error in string in query expression "6/3/2014 7:02:56 AM into FROM tbl_allexcel INNER JOIN Tdefic_LOCS ON tbl_allexcel.LO C = Tdefic_LOCS.LOC WHERE ((((tbl_allexce l.[LOC]) = [Forms]![frm_Main]![combolocation]) AND (Tdefic_LOCS.DE PT) =CLMS RES)) GROUP BY AGE ORDER BY AGE DESC;'.
I tried attaching my screen shot but...Leave a comment:
-
Ahh, I completely missed that. This code was originally created by someone else in a 2000 file format database. I'm not trying to get it functioning properly in 2010 without any documentation. It's a bit out of my league but fell into my lap.
Thank you!Leave a comment:
-
Thank you, NeoPa. That makes much more sense. I've changed some things in my code and now I'm receiving a syntax error. I've attached that as well as my code. When it errors out, it highlights in yellow "DoCmd.RunS QL (sql_criteria)
Code:Option Compare Database Option Explicit Const folder_Name = "\\waufs1-cluster\shared\Claims Res. Wausau\Access Files\" Function Age_Status() Dim sql_criteria
Leave a comment:
-
I'm sorry! Line 27 - Variable not defined.
Code:Option Compare Database Option Explicit Const folder_Name = "\\waufs1-cluster\shared\Claims Res. Wausau\Access Files\" Function Age_Status() Dim sql_criteria As String Dim rst_report Dim sql_LessAge As String Dim sql_GreaterAge As String Dim sql_LessLAge As String Dim sql_GreaterLAge As String
Leave a comment:
-
Thank you, jimatqsi. Something so simple in NeoPa's post but also so much going on at the same time. I understand now what he was saying after you commented.
I talked with the end user and I can remove the time/date stamp that is coded in this module. I've tried commenting it it out but that doesn't seem to work. I'm also not sure how to eliminate it in my sql criteria. Here is my current vba:
Code:Option Compare Database Option Explicit
Leave a comment:
-
I'm not sure what's wrong with line #7 sql_GreaterAge? NeoPa stated that I have sql_GreaterAge correctly as a string but I left sql_LessAge as a Variant. They look the same to me. I can't get passed that point now and my sql criteria seems completely messed up now. I'm so frustrated.Leave a comment:
-
Thank you! I believe that I followed your instructions correctly but now I'm getting a "Variable not defined" error message. Here is the code that I have now:
Code:ption Compare Database Option Explicit Const folder_Name = "\\waufs1-cluster\shared\Claims Res. Wausau\Access Files\" Function Age_Status() Dim sql_criteria As String Dim rst_report Dim sql_LessAge,
Leave a comment:
-
Run-time error 3141 - Access Conversion from 2003 to 2010
I've been stuck on this same sql statement for way too long and I'm about to throw my hands in the air and walk away. I'm just learning this database stuff. This original database was 2003 and I converted it to 2010. Nothing is working for me. For example, I'm trying to view a report and I keep receiving an error message: The SELECT statement includes a reserved word or an argument that is misspelled or missing, or the punctuation is incorrect. I...Last edited by zmbd; May 22 '14, 06:21 PM. Reason: [z{Please, click on the [CODE/] button in the post toolbar and then cut and paste your script between the[CODE] [/CODE]tags.}]
No activity results to display
Show More
Leave a comment: