Search results

  1. R

    code problem

    Me(NameOfControl).Name is a valid construct, but... Say the name of the control is txtMyControl, and you stuff that into the variable NameOfControl, then ? Me(NameOfControl).Name ? NameOfControl wouldn't they be the same? It should be sufficient to test against the NameOfControl...
  2. R

    Access behavior with SQL Backend

    Warning - opinions ;) While I am fond of ANSI-92 SQL syntax, I haven't bothered changing mode in any mdb yet. My reasoning is that since the Access interface is very much DAOish, and this syntax is closer to Jet syntax than the Access dialect, I doubt you can get full benefit of it. Also, since...
  3. R

    Adding label corupts form

    I experience something similar with reports and changing a text control to label. My workaround, was either copying another label, or probably the method you're using now. Very irritating and frustrating (kind of reminds me of using Windows ME (shudder)...) Just try experimenting with different...
  4. R

    Access behavior with SQL Backend

    I don't think I would ever consider switching ANSI mode in an existing app. See for instance the topic "Why should you avoid mixing queries created under different ANSI SQL modes" here http://office.microsoft.com/en-us/access/HP030704831033.aspx. Perhaps for a new app?
  5. R

    VBA to set focus to a report on load

    I've seen this, mostly in 2007, where hitting ctrl+p or the print button causes something else to print, or display over the report if you haven't "clicked" on the report first. Due to the setup in that app (all forms opened with acDialog), I needed to make whatever else got the focus...
  6. R

    Decimal Point Problems

    If you need to store decimals, you need to use either the datatype Currency or Numeric. For numeric, you need either the Field Size Single, Double or Decimal (for the latter, remember to set the scale, only applying formatting, doesn't make it store decimals). Byte, Integer and Long Integers do...
  7. R

    Unbound Continuous Form?

    I think missinglinq suggestion is probably the best. If bloat on your front end might be an issue, I'd suggest that your temp table(s) reside in a local temp db, which you can compact at regaler intervals. The ADO approach. If you create a disconnected recordset, you can't bind it to a form...
  8. R

    Word automation - runtime error type mismatch

    I don't think you did anything wrong the first time, based on what you said, and the code. I think there is something wrong with the Word reference on your computer, that maybe a re-registration or something can fix.
  9. R

    Compile Error on rst.Fields("Account")

    What is your function expecting? By how you pass this, it could be either a field object or the value property, but it'd probably be more interesting seeing the actual code. What happens if you try to be more explicit TheFunction(rst.Fields("MyField").Value / 1000) ? Try /Decompile too, for...
  10. R

    How do I make a report with counts of more than one field?

    Did You Try What I Suggested In My First Reply In This Thread? Stuff The Darn Thing Into To The Report Footer In Stead Of The Page Footer?
  11. R

    How do I make a report with counts of more than one field?

    See again first reply "Where you need the count (group footer(s)/report footer?)", you've put it in the page footer, which doesn't work, here it seems the report footer is appropriate. Also, it seems you intend to count all records with information in the field Meal, just use =Count([Meal])
  12. R

    How do I make a report with counts of more than one field?

    The ABS(Sum([TheFieldName] <operator> <condition>)) thingie is a nice trick which does the following It creates a boolean expression, i e [TheField] = 42 can be answered with either true or false. True and false are represented by -1 and 0 respectively, so by utilizing the aggregate Sum on that...
  13. R

    Can You Call the Description of a Database Object in VBA?

    > I was curious (I am Curious ), why would you include margins as well? There was a bug in the a2k version, were report margins could be reset. It was supposedly fixed by an SP, but not all of my clients are up to date, therefore storing and setting margins ensure the app works in 2000-2007...
  14. R

    How do I make a report with counts of more than one field?

    Yes, you'd need to either repeat the field =Abs(Sum([Cell] Like "A*" or [Cell] Like "B*" or [Cell] Like "C*" or [Cell] Like "D*")) or try something like =Abs(Sum([Cell] Like "[ABCD]*")) You got the "escape" character for ampersands? Just double them up (R&&D)
  15. R

    Variables when referring to object names

    Me.Controls("txtLabel" & var_num) or just Me("txtLabel" & var_num)
  16. R

    Form with subform doesn't show totals unless keyed

    There's Me.Requery to requery the data source of the form, then there's Me.Recalc which is intended to make calculated controls on a form recalculate. Mayhaps issuing a Me.Recalc at the end of the code that imports? Or first a Me.Requery, then a Me.Recalc?
  17. R

    Can You Call the Description of a Database Object in VBA?

    I have a tendency of creating one or more extra tables for report information. Using that, I can use simple SQL to populate combos/listboxes etc, and have all the extra information I wish, for instance user friendly report name and description, margins, user preferences for the report...
  18. R

    Unique Combination

    Table level lookups - lookup fields in the table - check out http://www.mvps.org/access/lookupfields.htm which detail most of the issues with them. What to use in stead? Since you should never allow any user near your tables, but have them enter/alter information through forms, you should use...
  19. R

    How do I make a report with counts of more than one field?

    That is strange, I think. The syntax =ABS(Sum([FieldName] = SomeValue)) or for text fields, also =ABS(Sum([FieldName] Like "SomeValue*")) should normally work. Couple of things to try 1 - where have you put the boxes (use one of the sections I mentioned) 2 - you are using the actual field...
Back
Top Bottom