Search results

  1. C

    Solved Where string

    How do I select all records with a boolean of 0 AND all records within a date range of boolean both 0 and -1? In other words all transactions that were not previously cleared in addition to cleared and uncleared of this month.
  2. C

    Syntax error "="

    This Works: If Me.selAlpha & "" = "" Then This does not work: If Me.Controls(Me.selAlpha).Caption = "All Accounts" Then Me.selAlpha & "" = "" I'm using Pat Hartman's form: I know I have a syntax error but I've looked at it and looked at it and I can't see it. Why does the...
  3. C

    self-referencing table with bridge

    I have a table of transactions. When I transfer money from one account to another I need 2 transactions: debit to one account and credit to the other. After Much Much messing I've decided I need a self-referencing table with a bridge between them Everything I've read says I need a subform with...
  4. C

    calculated address

    I have a nursery... Lanes (Rows) of trees, spaces (holes) for each tree. Each Tree has an address 34:125 or 17:62 (Lane:Space).. This has worked well for many years. Suddenly we asked the daughter to do data entry. She added duplicate addresses. My fault so I'm reworking the back end. Should...
  5. 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...
  6. 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]...
  7. 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...
  8. 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>" &...
  9. 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...
  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

    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...
  12. 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...
  13. 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 =...
  14. 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...
  15. 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}" & _ "...
  16. 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...
  17. 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 = " &...
  18. 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...
  19. 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 =...
  20. 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...
Back
Top Bottom