Search results

  1. C

    bad bracketing

    Thanks, Doc. I got it. Me.txtAmount = DSum("Amount", "qryAllPurpose", "AccountID = " & ID & strRange) I was trying to do a date range from the table "in" the query and not the actual query.
  2. C

    Form as Form? or String?

    I have a form that has 2 listboxes. Only 1 visible at a time. Since both share many routines I need to know which one is visible. Hence a little public routing that checks it. Public Function VisibleList(frm As Form) Dim ListView As ListBox If frm.lstName.Visible = True...
  3. C

    bad bracketing

    Well you can't throw a field in there without telling it where it comes from.. Even I know that much. The table is not part of my list box. I went back and removed all my brackets and it's working a charm. Thank you all.
  4. C

    bad bracketing

    using the string "tblTransaction.Ckdate" has worked for a long time but I need it for a combination of tables so I pulled together a generic query. I guess I've been away from it for awhile and it is not cooperating with my logic.
  5. C

    bad bracketing

    Function GetDateRange(DateField As String, RangeType As Integer) As String 'Last Month Dim firstmonth As Date Dim lastmonth As Date firstmonth = DateSerial(Year(Date), Month(Date), 0) lastmonth = DateSerial(Year(firstmonth), Month(firstmonth) - 12, 0) 'Quarterly Dim begMo As Integer Dim...
  6. C

    bad bracketing

    a vba call. It goes in a where string for a listbox row source.
  7. C

    bad bracketing

    I have a function that requires a field name as a string variable. Function GetDateRange(DateField As String, RangeType As Integer) As String I created an allpurpose query that contains a field ckDate. If I create a variable string "qryAllPurpose.CkDate" it returns [qryAllPurpose.CkDate]...
  8. C

    filter combo

    Nevermind! figured it out. I was using the wrong function. :confused:
  9. C

    filter combo

    ok ok I'll fix the dates. Not the problem I'm having though. My question is about the GetSql_filter and the dates are not run through that.
  10. C

    filter combo

    @MajP I'm struggling with the GetSQL_Filter. Everything was working well until I added in the filter combos. I've tried to work through the function but everytime I edit it I create a mess. I get this with the below code: (fAmount and fMemo are filter combos) I want this: If Nz(Me.SAmount...
  11. C

    Rich text format

    Public Sub SQLString() Dim tfFiltered As Boolean Dim tfOrderBy As Boolean Dim sql2 As String Dim sFilter As String Dim sOrderBy As String Dim i As Integer Dim v As Variant...
  12. C

    Rich text format

    It's all black. no color at all
  13. C

    Rich text format

    @arnelgp Why doesn't this text show the colors in the richtext text box? This code is in the inport/export form. Me.txtSQL = sql2 & IIf(tfFiltered, "<font color=""#2F5496""> WHERE </font>" & sFilter, "") & _ IIf(tfOrderBy, "<font color=""#2F5496""> ORDER BY </font>" &...
  14. C

    syntax error in function

    Thanks for all your help.
  15. C

    syntax error in function

    Ok ok okokok.. I'm rethinking the whole thing. I forgot that the popup is only for the custom selection (didn't read to the bottom!) and was trying to use it for complete date grab. I'm messing with something that worked well.
  16. C

    syntax error in function

    Well, what do you know! I added call in front of it and everything calmed down. Now I'll look into the rest of your answer.... The function is in a standard module and I thought call was not necessary but you're saying that because I wasn't capturing the return value I needed it? I do intend to...
  17. C

    syntax error in function

    If I mark out the GetDateRange it all compiles and the msgbox returns the values I need. But I can't compile with the formula in. I can't even get it to not turn red. I know I haven't done anything with the values yet. One step to work at a time! I was always told Rome wasn't built in a day. The...
  18. C

    syntax error in function

    Function GetDateRange(DateFieldName As String, RangeType As Integer) As String 'Last Month Dim firstofmonth As Date Dim lastofmonth As Date firstofmonth = DateSerial(Year(Date), Month(Date), 0) lastofmonth = DateSerial(Year(firstofmonth), Month(firstofmonth) - 12, 0) 'Quarterly Dim begMo...
  19. C

    syntax error in function

    I use that function all over like this: strRange = GetDateRange("CkDate", cboDate.Value) and it works fine. But now I'm trying to make it work on a popup form and I need to use a variable for various forms that call it. There is only one select case because I'm stumped before I've barely...
  20. C

    syntax error in function

    Function GetDateRange(DateFieldName As String, RangeType As Integer) As String With the above function, I cannot get GetDateRange (below) to compile The MsgBox returns CkDate & 48 which is exactly what I want but somehow I'm not entering the variable in the function properly. I've tried " & fld...
Back
Top Bottom