Search results

  1. MarkK

    Output data from tables into a directory or phonebook

    Are you talking about needing a hierarchical view? Like, do you want something like... Doe John Jane Bambi Smith Metal Gold Aero If so, look into grouping data in a report. You write a query that returns... Doe, John Doe, Jane Doe, Bambi Smith, Metal Smith, Gold Smith...
  2. MarkK

    ow to print a tree view

    Me.Controls("TreeReqs") is an Access.CustomControl object that only hosts the Treeview. Use its .Object property to expose the Treeview inside it, like... Private Sub PrntForm_Click() GetTreeViewText Me.TreeReqs.Object End Sub
  3. MarkK

    Field has no value

    I'd keep routines like this somehow within scope when you work with treeviews... Function GetNodeByKey(Key As String, Nodes As MSComctlLib.Nodes) As MSComctlLib.Node On Error Resume Next Set GetNodeByKey = Nodes(Key) End Function Sub SelectNode(nd As MSComctlLib.Node) If nd Is Nothing...
  4. MarkK

    Currency from US$ to GBP

    It's not clear what this means. • Maybe you need to do a currency conversion from US$ to GBP at the current conversion rate? • Maybe the currency symbol can just be changed in Windows regional settings? • Maybe your textboxes have a custom TextBox.Format property value that explicitly uses the...
  5. MarkK

    Pat Hartman has left the building

    Jon, I think this is a garbage call on your part. To me, if someone chooses to participate in a community, the contribution they freely make belongs to the community. I think it does a dishonour to the rest of us that rather than protect the quality and integrity of the threads we all...
  6. MarkK

    Hello from Canada!

    Hey Albert. Mark here, just 11 hours away by car, outside of Vancouver. Welcome!
  7. MarkK

    Creating a simple command line console app in Visual Studio 2019

    A little while a go I wrote a VB.Net console app to generate QR code .png files from data. I can just pass in the payload and filename, and it integrates seamlessly into the MS Access project. I even found a way to force it to run synchronously so I can call if from Report.Detail_Format()...
  8. MarkK

    How to ignore a mod?

    Pat I have reported your post with this note:
  9. MarkK

    Matching vba recordset to form recordset

    I wouldn't reach down into a child object, pull out its data source, apply a bunch of logic, and then stuff that data source back into the child... Rather, the child object should expose a method, like... Forms!frmDetail!ItemDetail.Form.AddItem ID, Path The object that owns the data should also...
  10. MarkK

    Recordset field not readable after update

    When adding a row to recordset, grab the new ID after an edit, but before the update... Dim newRowID As Long With CurrentDb.OpenRecordset("SELECT RowID, SomeField FROM Table1") .AddNew !SomeField = "Updated" newRowID = !RowID .Update End With
  11. MarkK

    VBA class modules & factory design

    A potential problem with not retaining data model instances--if you are going to create them at all--is that if your user/consumer code requests one, and then requests the same one again--which is very common--now you have two distinct instances representing the same data within your own system...
  12. MarkK

    VBA class modules & factory design

    I think you'd be more likely to use a factory pattern for composition, for instance, if you have a class that contains other classes. Then the factory might take responsibility for creating the parent instance, and injecting collections or related object instances specific to that parent...
  13. MarkK

    Help with looping through records

    If you use a With block... • you don't need a recordset variable Also, when you first open a recordset, if it... • contains no records, .EOF will be true. • contains one or more records, the first record will be current. Therefore, you don't need to... • check .BOF, or • .MoveFirst So you can...
  14. MarkK

    Working with form records

    The notes field is bound to the same RecordSource as that which drives the continuous form. If the record selected in the continuous form is on a new record, and you start typing in the notes field, this creates a row. One option to prevent this is as follows... Private Sub Form_Current()...
  15. MarkK

    Working with form records

    Do you have code somewhere that adds that null record? If so, I would debug by setting a breakpoint in that code. Then cause the problem. When execution hits your breakpoint, pop open the Call Stack viewer and look at what routines call what other routines such typing in the notes field causes...
  16. MarkK

    A great idea to fix our universities

    If institutions are required to kiss government ass, individuals will be so required in due course. Vote your conscience on this man, but before you do, take a look around the world, and take a look around history, take a look at states where institutions and individuals are required to kiss...
  17. MarkK

    A great idea to fix our universities

    Brilliant. Establish a Department of Truth, and only fund institutions that kiss government ass. Nice "Land of the Free" you got there. Sure would be a shame if something happened to it. And if state-sponsored institutional arm-twisting is valid, why stop there? Why not arm-twist individuals...
  18. MarkK

    Solved Changed relationships has stopped a form working

    When you create an entity in a database you should add a single row to a single table. If you want to add a Contact, your SQL should be "SELECT * FROM Contacts." To add one contact, you add one row. Notice that the schema for a contact contains no category data. A Contact entity has zero...
  19. MarkK

    SQL Code in Access Report

    If your report module supports class-global variables, these are not automatically reset between PrintPreview and Print. If, for instance, you show and hide Detail sections of your report based on some criteria your RecordSource is not aware of, and you have a ... Private m_sum As Currency '...
  20. MarkK

    A Function that returns a Recordset

    I find this a hard problem. Like, I've committed to a pattern, but it's not quite right, so making it work is painful and laborious. So do I stop, back up and get the pattern right, or push on and get the job done? Getting the job done will be way easier if I get the underlying pattern right...
Back
Top Bottom