Search results

  1. 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...
  2. 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...
  3. 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 =...
  4. 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...
  5. 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}" & _ "...
  6. 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...
  7. 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 = " &...
  8. 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...
  9. 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 =...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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.
  15. C

    Query totals loses decimal amounts

    I feel like I'm seriously overlooking something simple here. In the attached sample 3qryTransTotals has a field CAmount that is carried to 5qryRegister. In the 5qryRegister it loses its decimal amounts. This leaves the calculated field Remaining with various cents. All fields are Currency types...
  16. C

    syntax error with null values

    I'd like to insert a record: strSql = "INSERT INTO tblTransactions" & _ " ([fAccountID]" & _ ", [fNameID]" & _ ", [CkDate]" & _ ", [Num])" & _ " VALUES" & _ " (" & Me.cboAccount.Value & _ ", " & frm.cboFullName.Value & _ "...
  17. C

    Solved Using a query to filter a different query

    Probably an oft repeated question but I can't seem to find the right question to get an answer... I have FormA based on a calculated query. When I call FormB using FormA.Filter, the filter uses FormA query field name which doesn't work on FormB query field names even though they are both using...
  18. C

    Change backcolor on account change

    I have a form of Accounts with a subform of register. The subform is Parent/Child Account number. I'd like to tie the register background color to the account color. I can't figure out which event to use. Change of account triggers the Parent/Child connection. So I tried the Current Event...
  19. C

    Get 2 values from popup

    @MajP posted this function for retrieving values from popup forms: Public Function getValueFromPopUp(formName As String, PopUpControlName As String, Optional MyOpenArgs As String = "None") As Variant 'FormName: Name of the popup form 'PopupControlName: Name of the control on the pop...
  20. C

    hidden button is the active control

    I have a hidden button that calls a calculator (with a shortcut key). There are several fields on one form that use this button so I need to know the field name that's calling the button. Me.ActiveControl.Name returns the hidden button. How do I get the name of the field that is actually...
Back
Top Bottom