User Profile

Collapse

Profile Sidebar

Collapse
TheSmileyCoder
TheSmileyCoder
Last Activity: Dec 10 '24, 09:52 AM
Joined: Dec 4 '09
Location: Denmark
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I think this is related to a recent bug.
    Try to check for updates (even if it says fully updated)

    If that doesn’t work, try to place the file in a trusted location
    See more | Go to post

    Leave a comment:


  • 64 bit is going to be the recommendation going forward, and probably will also be the default choice soon.
    See more | Go to post

    Leave a comment:


  • Thank you. I've fixed the typo. I guess this falls under the category "better late than never"
    See more | Go to post

    Leave a comment:


  • I beg to differ a bit. If a user selects a bad entry in say a combobox, perhaps a status that is not valid, I usually prefer to force the value back to the original value (Otherwise the user is forced to either select the old value (which he might not remember) or do a manual undo(esc))
    So usually my code might be:
    Code:
    Private Sub SomeControl_BeforeUpdate(Cancel as Integer)
    Msgbox "This status is not valid, while ...."
    ...
    See more | Go to post

    Leave a comment:


  • TheSmileyCoder
    replied to Email Item as Link from Access
    I finally figured this out, many years later, and blogged about. You can find the blog post here:
    http://thesmileycoder.com/access-ema...ink-to-record/...
    See more | Go to post

    Leave a comment:


  • TheSmileyCoder
    replied to Passing a recordset to SQL
    I have not worked enough with adodb to give you the answer, but I presume either modify the existing parameteres, or delete and re-append
    See more | Go to post

    Leave a comment:


  • TheSmileyCoder
    replied to Passing a recordset to SQL
    The second time the loop executes, the parameters are added again, so the second time the execution has 8 parameters instead of 4.
    See more | Go to post

    Leave a comment:


  • TheSmileyCoder
    replied to Repaint onCurrent not working
    Sometimes I find it easier to set the enabled of a single control at a time, instead of as a group with statements like:
    Code:
    Me.ckbFastTrackPaper.Enabled=(Me.opgVisitType=1 and Me.opgHowLate=1)
    
    Me.ckbEvalShortTreat.Enabled=(Me.opgVisitType=1 and Me.opgHowLate=2)
    I personally find the logic easier to follow, than the nested Case statements, but that might just be a matter of preference.
    See more | Go to post

    Leave a comment:


  • TheSmileyCoder
    replied to Controlling Excel through Access VBA
    When your code reaches this line
    Code:
      With Selection
    Access recognizes that Selection is a method in the Excel library. However you have not specifed which instance of excel in which to use this method. So Access tries to help and generates a hidden excel instance on the fly, from which to execute the Selection method.

    Think of it like this is it helps. Imagine having 3 cars
    Code:
    Dim Car1 as Car
    Dim Car2 as Car
    ...
    See more | Go to post

    Leave a comment:


  • I see. What you could do is to move some of the information into a subform. That said, it seems from your pictures that stuff like box is really related to many records. The 2 boxes in your example have nothing to do with each other correct? In that case it should be in seperate rows.
    Also the lost time part seems to lend itself to a subform, with new records appearing as needed, instead of showing 12 blanc records. Does that make sense?
    See more | Go to post

    Leave a comment:


  • I remember reading somewhere that Access has a counter for controls on a form. If you add a control, access probably internally stores it as Control616.
    Those numbers are not re-usable, so there is in effect a limited amount of times you can add/remove a control from a form, and I believe that is why you can no longer add controls to your form.

    Could you provide an image of what the paper form currently looks like? That will probably...
    See more | Go to post

    Leave a comment:


  • I have never actually worked with this bit myself, but from all I've heard and read on forums, the answer is NO.
    I would recommend to her re-installing to 32 bit. 32 bit is still the recommended version by Microsoft.
    See more | Go to post

    Leave a comment:


  • TheSmileyCoder
    replied to Textbox Calendar Limiting
    You can't limit the datepicker to prevent a user from CHOOSING a date in the future, but you CAN prevent the user from SAVING it.

    In the CONTROLS Before_Update event you can do:
    Code:
    Private Sub DateControl_BeforeUpdate(Cancel as Integer)
      If Isnull(me.DateControl) then exit sub 'This allows the user to blank out the control
      if Me.DateControl>Date() then
         Cancel=True 'This stops the user from saving
    ...
    See more | Go to post

    Leave a comment:


  • What does the reference look like? (I.e. what is the controlsource property of the textbox in the report)

    What section of the report is the textbox located in?
    See more | Go to post

    Leave a comment:


  • TheSmileyCoder
    replied to Cursor position in subform
    Could you post the code of the afterupdate event? Do you have any other code related to that specific date control, such as an OnGotFocus event or?
    See more | Go to post

    Leave a comment:


  • TheSmileyCoder
    replied to Cursor position in subform
    Does your code include a requery call? A requery call will set the cursor at the first record.

    Which event exactly are you using? I am confused as there is no On Update event. There is a before update, After update, and On Change.
    See more | Go to post

    Leave a comment:


  • TheSmileyCoder
    replied to dcount or DAO.recordset?
    If you are just looking to see if a SINGLE record exists, you will be hard pressed to find any NOTICEABLE difference in performance.

    In that case, I would use Dlookup, simply because its a one-line statement, i.e. less code to maintain, and document.
    If you find your Dlookup is slow, then it is likely that your index have not been defined properly for the use case scenario.

    Now if you are looking up many records,...
    See more | Go to post

    Leave a comment:


  • Are you specifically turning off teh ribbon toolbar? Then I imagine that would do it for you, and cause weird behavior. If that is the case, I would say its more of a bug in 2010 that it worked at all.

    Workarounds I can think of:
    Create a (non-dialog) popup form that opens when the report opens, and closes when it closes again, with the functionality required.

    Re-enable the ribbon, and have a blank default ribbon....
    See more | Go to post

    Leave a comment:


  • You need to be clearer in your instructions to the machine. At current you are getting:
    [Expr1] + Chr(13) & Chr(10)
    evaluating to
    Null & chr(10)
    evaluating to
    chr(10)
    so instead, use:
    ([Expr1] + Chr(13) + Chr(10)) & ([Expr2] + Chr(13) + Chr(10))
    By adding the paranthesis (changing a + to a & and a & to a +), we are now changing the order of evaluation of the expressions.
    ...
    See more | Go to post

    Leave a comment:


  • I just wanted to expand on this, and show how to get the value of a secondary column in a multiselect listbox:
    Code:
       Dim v As Variant
       For Each v In Me.ListBoxControl.ItemsSelected
          Debug.Print Me.ListBoxControl.ItemData(v) & " - " & Me.ListBoxControl.Column(1, v)
       Next
    Where 1 is used to indicate I want the second column (Since the column count is 0 based)
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...