Author |
Message |
Jeff #1 / 8
|
 DCount problem
I have tried it exactly as coded below but I receive a run- time error 3075. What does this mean and what am I doing wrong? The error is in the Life = DCount line. Thanks Sub PrintLife() 'Count of Life Applications in Batch Dim Life As Integer Life = DCount("Mortgage Life Filter", "Application Requests", _ "[Printed] = True AND [Case Number] Is Not Null") 'Print Life Applications Dim Msg, Style, Title, Response Msg = "Printing Mortgage Life Applications?" & vbCrLf & Life & "Application(s)" & vbCrLf & "Click Yes when ready or No to cancel!" Style = vbYesNo Title = "Print Mortgage Life" Response = MsgBox(Msg, Style, Title) If Response = vbYes Then DoCmd.OpenForm "Mortgage Life" DoCmd.RunCommand acCmdPrint DoCmd.Close acForm, "Mortgage Life" End If End Sub
|
Sun, 09 May 2004 01:08:23 GMT |
|
 |
Brendan Reynold #2 / 8
|
 DCount problem
What's the error message, Jeff? I can't tell from the number, because: ? accesserror(3075) |1 in query expression '|2'. The "|1" and "|2" are placeholders that get filled in with further information about the error when it occurs. -- Brendan Reynolds
Quote: > I have tried it exactly as coded below but I receive a run- > time error 3075. What does this mean and > what am I doing wrong? The error is in the Life = DCount > line. Thanks > Sub PrintLife() > 'Count of Life Applications in Batch > Dim Life As Integer > Life = DCount("Mortgage Life Filter", "Application > Requests", _ > "[Printed] = True AND [Case Number] Is Not Null") > 'Print Life Applications > Dim Msg, Style, Title, Response > Msg = "Printing Mortgage Life Applications?" & vbCrLf > & Life & "Application(s)" & vbCrLf & "Click Yes when ready > or No to cancel!" > Style = vbYesNo > Title = "Print Mortgage Life" > Response = MsgBox(Msg, Style, Title) > If Response = vbYes Then > DoCmd.OpenForm "Mortgage Life" > DoCmd.RunCommand acCmdPrint > DoCmd.Close acForm, "Mortgage Life" > End If > End Sub
|
Sun, 09 May 2004 03:24:03 GMT |
|
 |
Jeff #3 / 8
|
 DCount problem
The error message reads: "Run-Time error '3075': Syntax error (missing operator) in query expression 'Count(Mortgage Life Filter)' Thanks for your help! Quote: >-----Original Message----- >What's the error message, Jeff? I can't tell from the number, because: >? accesserror(3075) >|1 in query expression '|2'. >The "|1" and "|2" are placeholders that get filled in with further >information about the error when it occurs. >-- >Brendan Reynolds
>> I have tried it exactly as coded below but I receive a run- >> time error 3075. What does this mean and >> what am I doing wrong? The error is in the Life = DCount >> line. Thanks >> Sub PrintLife() >> 'Count of Life Applications in Batch >> Dim Life As Integer >> Life = DCount("Mortgage Life Filter", "Application >> Requests", _ >> "[Printed] = True AND [Case Number] Is Not Null") >> 'Print Life Applications >> Dim Msg, Style, Title, Response >> Msg = "Printing Mortgage Life Applications?" & vbCrLf >> & Life & "Application(s)" & vbCrLf & "Click Yes when ready >> or No to cancel!" >> Style = vbYesNo >> Title = "Print Mortgage Life" >> Response = MsgBox(Msg, Style, Title) >> If Response = vbYes Then >> DoCmd.OpenForm "Mortgage Life" >> DoCmd.RunCommand acCmdPrint >> DoCmd.Close acForm, "Mortgage Life" >> End If >> End Sub >.
|
Sun, 09 May 2004 03:37:31 GMT |
|
 |
Jeff #4 / 8
|
 DCount problem
The error message reads: "Run-Time error '3075': Syntax error (missing operator) in query expression 'Count(Mortgage Life Filter)' Thanks for your help! Quote: >-----Original Message----- >What's the error message, Jeff? I can't tell from the number, because: >? accesserror(3075) >|1 in query expression '|2'. >The "|1" and "|2" are placeholders that get filled in with further >information about the error when it occurs. >-- >Brendan Reynolds
>> I have tried it exactly as coded below but I receive a run- >> time error 3075. What does this mean and >> what am I doing wrong? The error is in the Life = DCount >> line. Thanks >> Sub PrintLife() >> 'Count of Life Applications in Batch >> Dim Life As Integer >> Life = DCount("Mortgage Life Filter", "Application >> Requests", _ >> "[Printed] = True AND [Case Number] Is Not Null") >> 'Print Life Applications >> Dim Msg, Style, Title, Response >> Msg = "Printing Mortgage Life Applications?" & vbCrLf >> & Life & "Application(s)" & vbCrLf & "Click Yes when ready >> or No to cancel!" >> Style = vbYesNo >> Title = "Print Mortgage Life" >> Response = MsgBox(Msg, Style, Title) >> If Response = vbYes Then >> DoCmd.OpenForm "Mortgage Life" >> DoCmd.RunCommand acCmdPrint >> DoCmd.Close acForm, "Mortgage Life" >> End If >> End Sub >.
|
Sun, 09 May 2004 03:37:44 GMT |
|
 |
Brendan Reynold #5 / 8
|
 DCount problem
Well, as the phrase 'Count(Mortgage Life Filter)' doesn't appear anywhere in the code you posted, I'm guessing that 'Application Requests' is a query, and that the error is actually in the query and not the code. I think it's probably the spaces in the field name. I never use spaces in field names myself, so I find it difficult to remember exactly where and when they will cause problems. -- Brendan Reynolds
Quote: > The error message reads: > "Run-Time error '3075': > Syntax error (missing operator) in query expression > 'Count(Mortgage Life Filter)' > Thanks for your help! > >-----Original Message----- > >What's the error message, Jeff? I can't tell from the > number, because: > >? accesserror(3075) > >|1 in query expression '|2'. > >The "|1" and "|2" are placeholders that get filled in > with further > >information about the error when it occurs. > >-- > >Brendan Reynolds
> >> I have tried it exactly as coded below but I receive a > run- > >> time error 3075. What does this mean and > >> what am I doing wrong? The error is in the Life = > DCount > >> line. Thanks > >> Sub PrintLife() > >> 'Count of Life Applications in Batch > >> Dim Life As Integer > >> Life = DCount("Mortgage Life Filter", "Application > >> Requests", _ > >> "[Printed] = True AND [Case Number] Is Not Null") > >> 'Print Life Applications > >> Dim Msg, Style, Title, Response > >> Msg = "Printing Mortgage Life Applications?" & > vbCrLf > >> & Life & "Application(s)" & vbCrLf & "Click Yes when > ready > >> or No to cancel!" > >> Style = vbYesNo > >> Title = "Print Mortgage Life" > >> Response = MsgBox(Msg, Style, Title) > >> If Response = vbYes Then > >> DoCmd.OpenForm "Mortgage Life" > >> DoCmd.RunCommand acCmdPrint > >> DoCmd.Close acForm, "Mortgage Life" > >> End If > >> End Sub > >.
|
Sun, 09 May 2004 03:51:53 GMT |
|
 |
Scott Simonso #6 / 8
|
 DCount problem
This is a guess but is "True" a string? Are you trying to locate 1's or 0's? You may have to place a quotes around that, like "[Printed]=""""True"""" AND... Just a guess Scott Quote: > Dim Life As Integer > Life = DCount("Mortgage Life Filter", "Application > Requests", _ > "[Printed] = True AND [Case Number] Is Not Null") > 'Print Life Applications > Dim Msg, Style, Title, Response > Msg = "Printing Mortgage Life Applications?" & vbCrLf > & Life & "Application(s)" & vbCrLf & "Click Yes when ready > or No to cancel!" > Style = vbYesNo > Title = "Print Mortgage Life" > Response = MsgBox(Msg, Style, Title) > If Response = vbYes Then > DoCmd.OpenForm "Mortgage Life" > DoCmd.RunCommand acCmdPrint > DoCmd.Close acForm, "Mortgage Life" > End If > End Sub
|
Sun, 09 May 2004 07:25:29 GMT |
|
 |
Bruce M. Thompso #7 / 8
|
 DCount problem
Jeff: Just a quick interjection here. Try: Life = DCount("[Mortgage Life Filter]", "[Application Requests]", _ "[Printed] = True AND [Case Number] Is Not Null") -- Bruce M. Thompson, Microsoft Access MVP
Quote: >>No Email, Please. Keep all communications
within the newsgroups so that all might benefit.<<
Quote: > I have tried it exactly as coded below but I receive a run- > time error 3075. What does this mean and > what am I doing wrong? The error is in the Life = DCount > line. Thanks > Sub PrintLife() > 'Count of Life Applications in Batch > Dim Life As Integer > Life = DCount("Mortgage Life Filter", "Application > Requests", _ > "[Printed] = True AND [Case Number] Is Not Null") > 'Print Life Applications > Dim Msg, Style, Title, Response > Msg = "Printing Mortgage Life Applications?" & vbCrLf > & Life & "Application(s)" & vbCrLf & "Click Yes when ready > or No to cancel!" > Style = vbYesNo > Title = "Print Mortgage Life" > Response = MsgBox(Msg, Style, Title) > If Response = vbYes Then > DoCmd.OpenForm "Mortgage Life" > DoCmd.RunCommand acCmdPrint > DoCmd.Close acForm, "Mortgage Life" > End If > End Sub
|
Sun, 09 May 2004 07:29:11 GMT |
|
 |
Jeff #8 / 8
|
 DCount problem
I figured it out, I feel so stupid, I had Mortgage Life Filter instead of MortgageLifeFilter for the expr. Thanks Quote: >-----Original Message----- >Well, as the phrase 'Count(Mortgage Life Filter)' doesn't appear anywhere in >the code you posted, I'm guessing that 'Application
Requests' is a query, Quote: >and that the error is actually in the query and not the code. I think it's >probably the spaces in the field name. I never use spaces in field names >myself, so I find it difficult to remember exactly where and when they will >cause problems. >-- >Brendan Reynolds
>> The error message reads: >> "Run-Time error '3075': >> Syntax error (missing operator) in query expression >> 'Count(Mortgage Life Filter)' >> Thanks for your help! >> >-----Original Message----- >> >What's the error message, Jeff? I can't tell from the >> number, because: >> >? accesserror(3075) >> >|1 in query expression '|2'. >> >The "|1" and "|2" are placeholders that get filled in >> with further >> >information about the error when it occurs. >> >-- >> >Brendan Reynolds
>> >> I have tried it exactly as coded below but I receive a >> run- >> >> time error 3075. What does this mean and >> >> what am I doing wrong? The error is in the Life = >> DCount >> >> line. Thanks >> >> Sub PrintLife() >> >> 'Count of Life Applications in Batch >> >> Dim Life As Integer >> >> Life = DCount("Mortgage Life
Filter", "Application Quote: >> >> Requests", _ >> >> "[Printed] = True AND [Case Number] Is Not Null") >> >> 'Print Life Applications >> >> Dim Msg, Style, Title, Response >> >> Msg = "Printing Mortgage Life Applications?" & >> vbCrLf >> >> & Life & "Application(s)" & vbCrLf & "Click Yes when >> ready >> >> or No to cancel!" >> >> Style = vbYesNo >> >> Title = "Print Mortgage Life" >> >> Response = MsgBox(Msg, Style, Title) >> >> If Response = vbYes Then >> >> DoCmd.OpenForm "Mortgage Life" >> >> DoCmd.RunCommand acCmdPrint >> >> DoCmd.Close acForm, "Mortgage Life" >> >> End If >> >> End Sub >> >. >.
|
Sun, 09 May 2004 23:29:59 GMT |
|
|
|