Search results

  1. 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...
  2. 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]...
  3. 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...
  4. 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>" &...
  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

    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"...
  7. 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...
  8. C

    Element not found

    @MajP I'm sorry but I can only work on this a little at a time so it's dragging out... Item details (add, edit, remove, etc) are on a subform and the treeview is on the mainform. I don't delete items as such but only clear fields so that the DocNo stays and is used as items new are added or...
  9. C

    Treeview initialize

    @MajP I need to update the branch after adding an item: Public Sub UpdateBranch() Dim tvw As TreeviewForm Dim ParentNode As Node Dim newNode As Node Dim SelectedNode As Node Dim Key As String Set tvw =...
  10. C

    Solved Position form to added record

    I know how to get the ID (DMax) of a new record but I fill in (Update) unused records that aren't in the form recordset until the checkbox inuse is positive. I'm stumped as to how to get the ID if it isn't a new record. These records aren't included in the forms recordset until the table is...
  11. C

    Solved StringFormatSQL from Northwind

    When a variable is a string, the following adds quotes to it: strSql = StringFormatSQL("UPDATE tblItems" & _ " SET ITPath={0}," & _ " Item={1}," & _ " InUse={2}" & _ "...
  12. C

    Solved Node level path

    @MajP Me again :rolleyes: What am I doing wrong here? Public Sub UpdateSortAndLevel() 10 On Error GoTo Err_Handler Dim i As Variant Dim LevelSort As Integer Dim strSql As String Dim nd...
  13. C

    Matching vba recordset to form recordset

    I have the following code: Public Sub AddItem(ID As Long, strITPath As String) Dim rst As DAO.Recordset Dim strSql As String Dim lngDocNo As Integer Dim bkmrk As Variant strSql = "SELECT * from tblItems WHERE flocID = " &...
  14. C

    Solved Treeview address

    @MajP Because I'm looking for an address and the nodetext is very lengthy, I changed the NodeText to NodeLevel. That's not right either. What I'm looking for, and I think it's in E2E... sort of Each item has a DocNo that will be the ending number. But the LOPath of the locations should be: Top...
  15. C

    Solved Treeview nodes error

    @MajP When loading the treeview it completes but breaks at the last record Private Function FindRoot(ByVal nodX As Node, tvw As TreeView) As Node On Error GoTo ErrHandler Dim n As Integer n = nodX.Index Debug.Print nodX.Index While n <> nodX.Root.Index n =...
  16. C

    ItemGenie location address

    @MajP Some years ago I used your treeview to organize some file cabinets. I had a table of DRawers, a table of DIvisions, a table of FOlders, and a table of ITems. Then I used a union query for the treeview. Each item had an address of...
  17. C

    Error 5 installing V-Tools

    I had V-Tools installed and I was getting an error so I uninstalled it. Now I'd like it back again but every time it fails because of the following Error 5: lrc = api_RegQueryValueExNULL(lhKey, szValueName, 0&, lType, 0&, cch) If lrc <> ERROR_NONE Then Error 5 Irc returns the value of 2...
  18. C

    Solved Treeview nodelevel

    @MajP So I'm combining your ItemGenie with my own thing and getting all fancy and such... and I added fields to the application settings and created more formatting: (the orange fields will be hidden) . But when I got to the format treeview I realized there is no tvw property for nodelevel...
  19. C

    Open report without printing

    @Pat Hartman I'm trying to use Pat's label printing code. When I open the report from a form I use DoCmd.OpenReport strReport, acViewNormal, _ OpenArgs:=Me.Name & "|" & Skip The report immediately starts printing and does not hit the Open code in the report. Private...
  20. C

    query for labels

    is there a way to insert blank rows into a query that printing labels can start in any label? I presently insert into a table and then insert blank rows but this seems like I may be missing an easier way.
Back
Top Bottom