Recent content by GK in the UK

  1. G

    RecordSet vs Recordsource for dynamically binding data

    Q. In general, what is the preferred approach, setting the recordset or recordsource? As you have discovered you can open a Recordset from a QueryDef with the parameters passed in. But if you apply filters Access asks for the arguments so it doesn't really work. Q. Is it possible to set...
  2. G

    Question about field size

    Can't we just test it with a Hex Editor on the Access file and find out? I tried it with XVI32 on a new monolithic Access DB, and changing the value of a 3-character string in a table resulted in the old value not getting a hit at all, and the new value appearing in the file in the identical...
  3. G

    Multiple Form Instances in Northwind2 and Query Criteria

    Yes, sorry, by unqualified I mean with no criteria or parameter, just returns all the records. But in Form_Load, criteria is applied and I'm suggesting it's too late, isn't it?
  4. G

    Multiple Form Instances in Northwind2 and Query Criteria

    I open form instances with a somewhat clunky way of getting a single record PK into the recordsource query, so I was interested to see how it's done in Northwind2. To my surprise one of the two forms that are opened as instances has an unqualified query as recordsource. In Form_Load, there's a...
  5. G

    Solved Saving records

    Before Update will fire regardless of how the record gets saved. If a record is dirty, you simply cannot stop it from firing other than pulling the plug or killing Access. It’s the last thing that happens before the record actually gets updated to the disk, and it’s where you should have...
  6. G

    Duplicate Records in Main Form and Subform

    I think there is confusion about NewSaleID and what it is. It isn't your new invoice number, it's the Access auto-generated ID of the new parent record. Access provides it automatically when you .Update the parent record. At that point, you can put that new ID into your child record. It has...
  7. G

    How do you clear a listbox?

    Thank goodness it's not just me that's been puzzled by this thread. MajP's demo works as he says it does, but it's not the behaviour I see. My listbox properties are: Control Source: empty, RowSource, empty, RowSourceType: Table/Query. RowSource is set in code, list populates, and when I...
  8. G

    Currency formatted as 0.0000

    Have you tried setting the format of your field to a custom format? You say you set it to 0.0000 but did you define the format correctly? Like this: #,###.0000 So: entry of 1 shows 1.0000 entry of 1.27 shows 1.2700 entry of 1.2345 shows 1.2345 Works for me where the table field data type...
  9. G

    Discard form design changes on normal close (unhide columns counts as design change)

    I have a sub form in a tab control which is a datasheet. The column filters are all available. By default there are some hidden columns but they can be unhidden which is ok. But on close of the main form, using the X, Access asks if I want to save the changes. How do I stop this message...
  10. G

    Solved Sequential numbers

    I'm kind of wishing I hadn't linked the article, yes it's old but it's something I discovered as an Access beginner and it seemed to fit the bill. The dbDenyRead was a kind of 'ah-ha' moment. Does no-one use this? The issue of duplicated Autonumbers mentioned in the article is really a red...
  11. G

    Solved Sequential numbers

    I may have misunderstood your original question. Almost all of my tables have meaningless autonumbers. as keys. Some have natural keys. But I don't use autonumbers for any business purpose. Just as an aside, I have a table with a natural key which turned out to be a mistake, not because I...
  12. G

    Solved Sequential numbers

    I adapted this code. You can code it to have any kind of prefix/suffix you like. You need a table to maintain the last picked number for each document type. Built for multiple users but my implementation doesn't test that. What it doesn't do, is recover the number for a deleted record. In...
  13. G

    Unbound Lookup with Search form and Query Builder (Beta, WiP)

    My first submission. To be honest I'm always amazed by how the experts here can get so much done with so little code. This might be an example of how little is done with a ton of code, not really sure. If this makes the grade tell me if it should go in Code Repository or Sample Databases...
  14. G

    Greatest ONE LINE in a song ever

    It would have to Born Under A Bad Sign. But as a folk guy as well some of Ewan MacColl's lyrics are priceless.
  15. G

    Greatest ONE LINE in a song ever

    And when he died, all he left us was alone I once loved a maid, a spot welder by trade If it wasn’t for bad luck, I wouldn’t have no luck at all you keep lyin', when you oughta be truthin' Look pretty young but I’m just backdated
Top Bottom