Search results

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. C

    OutputTo Excel error

    upon further research I discovered a function at BTAB Development called Send2Excel. I changed Send2Excel(frm As Form, Optional strSheetName As String) to (strSql As String, Optional strSheetName As String) and then used my listbox rowsource as Sql and opened the recordset with the Sql. the...
  7. C

    OutputTo Excel error

    Well, to be perfectly honest, most things I don't understand. I just go with the flow. Sometimes I get the feeling that the code gets tired of dealing with me and just starts working.
  8. C

    OutputTo Excel error

    Well, yeah. but I wanted to give it no name so I wouldn't have to delete it every time. How would that work?
  9. C

    OutputTo Excel error

    Figured it out! Give the Querydef a name as follows: strSql = Me.lstUsage.RowSource Set qdfTemp = CurrentDb.CreateQueryDef("qryTemp", strSql) filePath = "D:\Documents\Access\Mine\Finances\ExportedData.xlsx" DoCmd.OutputTo acOutputQuery, "qryTemp", acFormatXLSX, filePath, True...
  10. C

    OutputTo Excel error

    I want to export the data from a listbox to Excel. I pretty much followed the Microsoft Help to come up with the following: strSql = Me.lstUsage.RowSource Set qdfTemp = CurrentDb.CreateQueryDef("", strSql) filePath = "D:\Documents\Access\Mine\Finances\ExportedData.xlsx"...
  11. C

    Field has no value

    Oh Rats! You guys! now it works!:sneaky: :rolleyes: I'm going shopping.
  12. C

    Field has no value

    click on an item. (brown). it immediately goes to If IsNull(subFrmItem.ItemID) Then and stops. It is not null. It just stops. It cannot have a null ID. Does not have a null idea. Just thinks it does.
  13. C

    Field has no value

    I'm sorry. I thought I did! :rolleyes:
  14. C

    Field has no value

    Well that works.... but it stalls on the first line and I have to push it on. Would you like to look at it? Click Detail and then select an item
  15. C

    Field has no value

    I thought I could have the flow go both ways. The Location subform has all the locations as a recordset and the Detail subform has a recordset of records under the selected location. Mostly it works but the tree loses it's connection on the above situation. So I got this brilliant idea: Public...
  16. C

    Field has no value

    I put both do Events and Set Focus and it seems to be working. If I put only set focus it says you can't go to the specified record. Thank you very much for your time.
  17. C

    Field has no value

    AAARRRGGGHHHH! I Knew That! But wait... I screamed too soon On open of the main form I have: Set subFrmItem = Me!ItemDetail.Form Most of the time it actually does work. But jumping to make the form visible seems to show no valid ID. It immediately works after it complains
  18. C

    Field has no value

    @MajP
  19. C

    Field has no value

    On a treeview click I use this for matching the subform to the clickednode: Public Sub MatchNode() Dim strKey As String Dim ID As Long Dim Children As Integer Children = DCount("*", "tblItems", "flocID = " & Me.txtLocID & " And InUse = True") If...
  20. C

    Element not found

    Gotcha! Thanks
Back
Top Bottom