Search results

  1. MarkK

    Command button not responding to double click

    I would use a CheckBox, like... Private Sub chkIsDesc_Click() setIndex End Sub Private Sub setIndex() Me.OrderBy = "Spec_raw" & IIf(Me.chkIsDesc, " Desc", "") End Sub I think a double-click on a command button is an unexpected behaviour.
  2. MarkK

    Tooltip with textbox when hovering over label

    You can also take a look at post #7 in this thread. I posted a sample Db that shows how you can use a form as a popup.
  3. MarkK

    Design/Structure Ideas for Data Entry form with multiple levels

    If your tables are not sufficient to model the problem accurately, then it is too soon to design data entry.
  4. MarkK

    Having a brain cramp

    I don't fully understand your problem, but looking at the code, it might be useful to know that you can just assign a bookmark to a string. It looks like you have a separate recordset variable rsCurAnomaly, and it looks like all it does is support a bookmark. Instead, you should be able to do...
  5. MarkK

    Query not giving expected multiplication results

    If you need numbers rounded to some fixed count of decimal places, use the Round() function. ? Round(0.195867, 2) 0.2 ? Round(0.046, 2) 0.05 And it works in queries too.
  6. MarkK

    Show a specific field

    If data state affects the presentation of your user interface, you will need to calculate this presentation in two cases, 1) when user changes said data, and 2) when you arrive at a new record. This being the case, it is common practice to perform this presentation logic in a separate method...
  7. MarkK

    Solved Restrict Data Entry

    In your data, how is this "wrongness" identifiable? It seems like a mistake if there is more than one product table.
  8. MarkK

    Solved Combo/List Box Lookup Add Item

    If you set the RowSourceType of a ComboBox or ListBox to "Value List", you can run the AddItem() method to add a row to the list, so you can loop through any enumerable list, and fill the control programmatically that way. If you have multiple columns, delimit column data with a semi-colon...
  9. MarkK

    count query.

    Moving data around in a relational database, as you are experiencing, is a difficulty kind of like paddling upstream. What I would be more likely to recommend is that you use a query to identify problem rows or areas in your existing table, and present your number 4) as queried from source using...
  10. MarkK

    count query.

    I don't understand this overall requirement. You delete 123.1 so you can find areas where 123.1 should exist? Seems to me if you don't do 3), then you don't have to do 4), and then 1) and 2) are pointless, and *poof*, the whole problem evaporates. So I don't get it.
  11. MarkK

    FYI

    But another thing: Me (in this context) and Screen.ActiveForm are UI elements, and there's not a lot of UI operations requiring 10 million iterations. If you perform either of these operations once, or maybe even five or eight times, which is what you would do presenting your UI, the time...
  12. MarkK

    FYI

    I think this is a fairer test... Private Sub timeTest() Const MAX_L As Long = 10000000 Dim i As Long Dim clock As Single Dim frm As Form clock = Timer For i = 0 To MAX_L Set frm = Me Next Debug.Print "Using Me: ", Round(Timer - clock, 6)...
  13. MarkK

    How to return null when summing values that include nulls

    If you want more help, show your exact code/SQL etc... Remember, if in a particular row a field like [MyColumn] is null, then the boolean expression "[MyColumn] Is Null" evaluates to -1 (True) for that row. If we then Sum() that expression, we get a (negated) count of null rows. The...
  14. MarkK

    Resize a control on a continuous form

    Any property of a control you set in a continuous form affects all rows. What might make more sense is to show the current row in the header or footer, and make it available for editing/formatting/size-changing in that context.
  15. MarkK

    Looking for a Big Fat Book!

    The Stand, Stephen King. Post-apocalyptic sci-fi. 1400+ pages.
  16. MarkK

    How to return null when summing values that include nulls

    You can also do this... SELECT IIf(Sum([MyColumn] Is Null), Null, Sum([MyColumn])) AS MyColumnSum FROM tMyTable; If one or more rows have nulls, this expression: Sum([MyColumn] Is Null) is true, so return a Null, otherwise return the complete sum.
  17. MarkK

    Creating stock balance by month

    A table should store a type of thing. Maybe you have a Person table, or Transaction, Job, WorkOrder, SalesOrder, Product, Customer, or Patient, names that describe a type of thing. Table names like DataEntry, DispensedQuantity, InventoryAddition, ItemCode, don't make sense because they do not...
  18. MarkK

    OpenArgs

    You can do this... Private Sub Form_Open(Cancel As Integer) If IsNumeric(Me.OpenArgs) Then GoToID CLng(Me.OpenArgs) Else DoCmd.GoToRecord , , acNewRec End If End Sub ... so if you pass a valid numeric ID in OpenArgs, it navigates to that row, else it adds a row. But...
  19. MarkK

    DB behavior is bizarre

    Riffing off your code, if you broke it out into subroutines, you could do it like this... Sub SilenceTimers() Dim frm As Form For Each frm In Forms SilenceAll frm Next frm End Sub Private Sub SilenceAll(frm As Form) SilenceFormTimer frm SilenceSubformTimers...
  20. MarkK

    Watercooler v political forum

    But you can move threads to appropriate forums.
Back
Top Bottom