Search results

  1. Mile-O

    If vs If Not (One works the other doesn't)

    The Not applies only to the first check. If Me.ComboBillable <> "Yes" And Me.ComboBillable <> "No" Then Or: If IsNull(Me.ComboBillable) Then
  2. Mile-O

    Call Public Function

    The module that comes with a form is called a Class Module. It's an enclosed world in there and one does not simply call the function within it as you would a function in a regular Module. Calling the function from a query - form open or not - does not give the query access to the form's...
  3. Mile-O

    Using insert into command

    Trying to understand this...you're trying to insert blank rows into a database table? If so, it goes against the idea of a database. coded so that after certain labels are printed the database will print a blank label. Is there any logic to these 'certain labels'?
  4. Mile-O

    Schedule in Calender

    I suppose that rather than command boxes in my attachment, you could use 42 listboxes. In the attached - which will throw up an error if month or year is blank - there is some data in for August 2014. It's not your answer, but may give a suggestion of the complexity involved. May even be a...
  5. Mile-O

    Schedule in Calender

    You could, in effect, create one but it would require 42 command buttons for the calendar dates alone, then code to calculate and caption which ones would be available based on the year and month. Plus what you want each command button to do (though a class module could be employed to deal with...
  6. Mile-O

    Can you set a value to a variable outside a sub?

    One thing not mentioned yet is the ability to dimension a static variable inside a subroutine or function. This will retain the value after the routine or function has ended. It is still only usable within that subroutine or function's scope. Static MyVar As Long
  7. Mile-O

    Visually testing your database

    Perhaps put up a physical form example. All else is theoretical.
  8. Mile-O

    "Combos with Tens of Thousands of Records"

    Good spot.
  9. Mile-O

    "Combos with Tens of Thousands of Records"

    You know, the only time I use ! is in queries, forms, and reports. I prefer never to use it in VBA. Would much prefer to pick up as many coding errors as possible at compile time rather than run-time.
  10. Mile-O

    Visually testing your database

    I don't, as it's not really been an issue where I am. However, although it may take a bit more work, you could design forms for different screen resolutions and then do a check via VBA to determine which resolution is being used and then load up the relevant form tailored to that resolution.
  11. Mile-O

    Loop through recordset not recognizing .MoveNext?

    Quick thought: have you tried using the date delimiter when using dates as criteria? (And brackets around that awkward underscoring in the field name...!!) intArticleID = DLookup("ID", "tblArticles", "[Sourcing_Date] = #" & ![Sourcing_Date] & "#")
  12. Mile-O

    Show all names in first column and insert zero where no record exists

    As i said, hasty example with little thought put into it. However, would be helpful if you therefore gave some information on your actual table structure and, if any, your thinking behind it.
  13. Mile-O

    Show all names in first column and insert zero where no record exists

    Yeah, I was a little hasty in my first example and subsequently deleted it. :o
  14. Mile-O

    Show all names in first column and insert zero where no record exists

    Quick example, which may be of some help in signalling a direction to take.
  15. Mile-O

    Show all names in first column and insert zero where no record exists

    Looking at that SQL my first concern is that it looks like you have a table called [2015 Holiday]. If so, why? Surely a single Holidays table covering every possible year would be easier to work with?
  16. Mile-O

    Runtime error 5

    Is a particular line of code highlighted?
  17. Mile-O

    Text box changes

    You can do it in the form's module. That's where the Form_Load event is.
  18. Mile-O

    Text box changes

    First, you may be better to use fOSUserName() - google it! - for a more robust user name formula. Environ() can be spoofed. Now, what you want is for your form to check the NewRecord property. In your form load event, try something like: If Me.NewRecord Then Me.txtYourTextBox.Enabled =...
  19. Mile-O

    combo box restriction

    Start by googling for fOSUsername(), which is some code that will give the user's name. In the table that holds the user data, add a field for their system ID and add them. Then, on your form, you can do a comparison with the user selected and their fOSUsername(). Plenty of threads on this...
  20. Mile-O

    Complicated Split

    Also, if you do a little check like this...then you can fill out the year completely, assuming that every boat year will be 19. "VALUES(""" & fieldNam & """, """ & IIf(Len(arrayVal(1))=2,"19","") & _ arrayVal(1)) & " & """,""" & IIf(Len(arrayVal(2))=2,"19","") & arrayVal(2)) & """,""" &...
Back
Top Bottom