Search results

  1. M

    increase/decrease values in the fields?

    It's asking you for the name of the control that will be affected by pressing the up/down buttons. Make a textbox, put it next to the up/down control however you want, and then name that control something obvious and type in the name of that control into the Buddy Control name. Example: Name...
  2. M

    Storing integers between 0 and about 808 quadrillion -- Strings, Decimal, or Variant?

    In Access, I don't think you can set the number of decimal spaces for a variable like that. You can only control the number of decimals it displays, not necessarily what is stored. You said you were working entirely with integers, so you should be fine here.
  3. M

    A user-friendly way to Link Tables in a Split Database

    Here's how you'll do it: DoCmd.TransferDatabase acLink, "Microsoft Access", strLinkTo, acTable, strSrceTableName, strDestTableName, False strLinkTo - The full path and filename of the DB that contains the tables you are linking to. strSrceTableName - The name of the table you are linking to in...
  4. M

    Built in Functions not working

    Specifically, this is the Microsoft Access X.0 Reference Library. In your DB that won't work, open the code window (press F11), and go to Tools -> References. You'll most likely see something very similar to this (along with plenty of other stuff): MISSING: Microsoft Access 12.0 Object...
  5. M

    Text box with nz() very slow

    Almost all forms should be based on queries of some sort, even if it's just a select * on a table. That's not 100% all of the time, but when using calculated controls on a field, the query is always faster than the formula in the form. This is because the query prepopulates the data for you...
  6. M

    Storing integers between 0 and about 808 quadrillion -- Strings, Decimal, or Variant?

    Answer to Question 1: You should be fine with a Decimal data type. Just set it to zero decimal places. Answer to Question 2: A Variant will take on any type of value, be it text, numbers, an object, etc. Variants should be avoided in most cases as VBA has to figure out what type of variable...
  7. M

    Looking for critique of VBA snippet (Familar with C++/databases on Unix)

    Neither of the latter examples will work. If the recordset is empty (EOF is true), then trying to set a field in it will result in an error. Change to this: If rs.EOF Then rs.AddNew rs!FieldA = "Field Data" rs.Update Else rs!FieldB = "Something Else" End If And yes, any...
  8. M

    Text box with nz() very slow

    How many records are we talking? Thousands and thousands? If that's the case, then yes, the NZ will take a little bit of time. Have you tried basing the form on a query and running the NZ in the query?
  9. M

    Text box with nz() very slow

    Good to see we all have extremely exciting Monday nights. :P
  10. M

    Text box with nz() very slow

    Tested. And denied. ;) In the immediate window, a non-declared variable (essentially a NULL) + " " produces a space. In code, a NULL + " " produces nothing. It was tested, but with different results. You learn something new everyday. ;)
  11. M

    timestamp

    Why not just store the actual time instead of the serial number?
  12. M

    Populate multiple control texts via recordset

    After he posts a few sample lines from both tables, I'll show you how to do this efficiently and effectively.
  13. M

    Text box with nz() very slow

    Actually, Chris, you don't want to use a plus sign to concatenate strings like that. There's still the problem of the spaces as well.
  14. M

    Text box with nz() very slow

    Also, unless Nz works different in 2007, this will never return the word "Untitled": =Nz([FirstName] & " " & [MiddleName] & " " & [LastName],"Untitled") You have two spaces in there, so the value will never be NULL, and the word "Untitled" will never be returned. In order for it to work...
  15. M

    Best Practice: multiple values

    What is an example or two of a common error (one of the 50) and it's correction? If it's what I think it is, this will be easy, but I want to see an example first.
  16. M

    Msgbox option

    A standard message box won't do that. We can use a simple timer event though, so the solution is this: 1) Make a new form (f_BackupMessage or some name that makes sense to you). 2) On the form, put just one label in the center that says, "Backup Complete" or whatever message you want. 3) In...
  17. M

    Msgbox option

    So, you just want a message displayed that says "Backup Complete" for X amount of time, and then the message box closes itself?
  18. M

    Populate multiple control texts via recordset

    So, to make sure I get it right, you've got a client table setup like this: ClientID ClientName 1 ABC Company 2 DEF Company 3 GHI Company . . . . X X company And you have a notes table that is associated with this table, something like...
  19. M

    Populate multiple control texts via recordset

    You never did tell us why you are not using a bound form. Your code is way overkill for what you're trying to accomplish, and much of what you are trying to program around is actually functionality built-in to Access. I understand that you are trying to view 16 entries at a time, but the...
  20. M

    Dog boarding db ,date question

    Without getting too technical, just make a parameter query out of it. SELECT * FROM YourTableName WHERE YourTableName.ArrivalDate <= [CheckDate] AND YourTableName.DepartureDate >= [CheckDate]; That will prompt you for "CheckDate". It will then return the records with an Arrival <= the date...
Back
Top Bottom