Search results

  1. 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...
  2. 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()...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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 '...
  8. 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...
  9. MarkK

    Solved Treeview nodes error

    Is that a real estate database?
  10. MarkK

    A Function that returns a Recordset

    I don't know much about how memory works, but my machine has 12GB of RAM. Task Manager says I've occupied 61%, so I've got 7.3GB of wiggle-room, and the max size for an Access file is 2GB. I think it'll be fine.
  11. MarkK

    A Function that returns a Recordset

    It's hard to deal with hierarchies in recordsets, but it's way easier if you use classes. Imagine a class that stores its Field.Values in a Scripting.Dictionary keyed by Field.Name... Private fields_ As New Scripting.Dictionary Private children_ As New Scripting.Dictionary Function...
  12. MarkK

    Variable assignment not working.

    You might be over-focused on this single method call as "the problem." What is the code for gbl_SH? How is it created and exposed? Under what circumstances is RegKeyRead() called? You've only shown the entry point.
  13. MarkK

    Reducing foreign visa tech workers

    When smart people leave India, India is not a beneficiary, https://www.cbc.ca/news/business/us-h1b-visa-canada-benefits-1.7640068 Trump's move is a gift, but not to America.
  14. MarkK

    Access Based Media Manager

    A link makes sense if a child entity is multi-dimensional, but if the child only has one dimension, just store that single data-point directly in the parent. You can put a combo on the field, and look up a finite list of data if you want, but when you link to a single field, the complexity of...
  15. MarkK

    Expression After Update you entered as the property setting produced the following error

    This might be a data error, for instance, a field you expect to contain a value is actually null. When processing the report (so only some reports for only some sets of data) the null causes an unhandled error, which bubbles up the call stack, and manifests as a failure in a higher level...
  16. MarkK

    Experience with Ms Project and Access?

    I did a bit of work in MS Project a couple of years ago, and my impression was it was wide open for integration. It exposes tons of open text and numeric fields you can push data into. I thought the object model was superficially simple, with Tasks and Resources as the two main info silos, and...
  17. MarkK

    Solved How to handle ' in sql string

    IMO, a far more robust solution looks like... Sub DoInsert() Const SQL_INSERT = _ "INSERT INTO images " & _ "( Genus, SpeciesEpithet, [Image], Collection, Author, sub, infrafamily ) " & _ "SELECT A.Genus, A.SpeciesEpithet, A.[image], 'Collier', 'Barry Collier', "...
  18. MarkK

    Solved Need help with one of my Time Clock forms

    My 2c is get the employee to provide a name, and then present--as a subform--the correct UI for the active task for that employee for that time period. Then each UI element is completely focused on its own responsibility and everything gets way simpler. • The MainForm is responsible for 1)...
  19. MarkK

    Solved Get A Pointer In SubForm To Already Instantiated Class

    Here's a quick sample of how some classes might work together to do stuff...
  20. MarkK

    Solved Get A Pointer In SubForm To Already Instantiated Class

    No, this is more a Service Locator pattern, not a factory. A factory is more under-the-hood, and would not have project-global exposure. The intent of a provider or service locator is to make resources more easily available to other code.
Back
Top Bottom