User Profile

Collapse

Profile Sidebar

Collapse
PPelle
PPelle
Last Activity: Jun 4 '14, 12:43 AM
Joined: Nov 29 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Yes, you're right, I had to make a guess. :) Sorry about that, I didn't see your reply before a made mine.
    See more | Go to post

    Leave a comment:


  • Try this if the listbox is loosing its value:

    Code:
    Dim vTemp as Variant ' May change to the datatype of the bound field
    
    vTemp=[Forms]![orderf].Form![sfOrderAvgAllQ1]
    [Forms]![orderf].Form![sfOrderAvgAllQ1].Requery
    [Forms]![orderf].Form![sfOrderAvgAllQ1]=vTemp
    Or this for bound forms:

    Code:
    Dim strBookmark as String
    
    strBookmark=Me.Bookmark
    Me.Requery
    ...
    See more | Go to post

    Leave a comment:


  • Edit the query, change Expr1 to your desired name.
    See more | Go to post

    Leave a comment:


  • A bit OT, but I just can't comprehend why you are cluttering your code with this hack for strFirstOfMonth , when lngFirstOfMonth two lines below is doing the same thing, and working perfectly well all over the world? Am I missing something?
    See more | Go to post

    Leave a comment:


  • I haven't read through all posts, and there probably is a good reason you don't use the built-in CurrentUser variable in vba, or [CurrentUser] in queries. Maybe you are not using the Access security to login, but those who are, can probably use this variable instead?

    CurrentUser Function
    See more | Go to post

    Leave a comment:


  • PPelle
    replied to MS Access Calendar - First Day of Week
    Okey, thanks for your reply. I will assume than that this is all that is required. I have a few code lines that will actually use the system settings, automatically or by changing a constant. I can post it here if there is any chance you will include this in your code base.
    See more | Go to post

    Leave a comment:


  • PPelle
    replied to MS Access Calendar Error when Printing
    That's right, if you do a direct print. Printpreview will interfere with the data population, and give you the error you see and no data in the report.

    This will open the print dialog (Access 2003, hopefully in 2013 also), where you can adjust margins so the form will fit on one page:

    Code:
    DoCmd.RunCommand acCmdPrint
    ...
    See more | Go to post

    Leave a comment:


  • And your version of MS Access is? Table field type? You are talking about real line breaks, not all data cut off/lost after 255 characters, also in the table?
    See more | Go to post

    Leave a comment:


  • PPelle
    replied to Acces calander with mysql
    In the working strSQL2, replace ctlDayBlock.Tag with one of these, try one at a time:
    1. Format(ctlDayBl ock.Tag,"YYYY-MM-DD")
    2. Format(ctlDayBl ock.Tag,"\#YYYY-MM-DD\#")
    3. Format(ctlDayBl ock.Tag,"\#mm\/dd\/yyyy hh\:nn\:ss\#;;; \N\u\l\l")

    If none of them work, try this:
    4. Format(CDate(ct lDayBlock.Tag), "YYYY-MM-DD")
    5. Format(CDate(ct lDayBlock.Tag), "\#YYYY-MM-DD\#")...
    See more | Go to post

    Leave a comment:


  • PPelle
    replied to MS Access Calendar Error when Printing
    The error is caused by the Form_Activate procedure. But printing the form is to no use anyway, since it is unbound, all fields will be empty in the printout. You will need to design a report based on the table which holds the data you want.

    Maybe it would be easier for you to try another calendar, like this one, which has a nice report included.
    See more | Go to post
    Last edited by PPelle; Dec 9 '13, 11:29 PM. Reason: Link

    Leave a comment:


  • PPelle
    replied to MS Access Calendar Error when Printing
    Remove the first and the last ", like this:

    Code:
    DoCmd.PrintOut Application.Printers("HP Deskjet 3050A J611 series (Copy 1)").Orientation = acPRORLandscape
    See more | Go to post

    Leave a comment:


  • PPelle
    started a topic MS Access Calendar - First Day of Week

    MS Access Calendar - First Day of Week

    I believe I read a post somewhere here on how to change the first day of the week to Monday in this MS Access Calendar, but is unable to search it up again. I've changed lines 5 and 8 in the quoted code (PopulateCalend ar Sub-Routine, and by the way, line 4 seems to be missing a "/"?), and moved the day labels around. To my surprise, this is working so far. Is this all that is required? I'm a bit worried that I've overlooked anything....
    See more | Go to post
    Last edited by PPelle; Dec 9 '13, 06:45 AM. Reason: Link.

  • I just did this by making a copy of frmCalendar, no other change, and it works flawlessly. What errors are you seeing?

    But you can't make the calendar popup, that will prevent the Form_Activate proc from running, where the populating is done. To fix this, just add PopulateCalenda r to the Form_Open proc.
    See more | Go to post

    Leave a comment:


  • PPelle
    replied to Huge date bug?
    Thanks for all suggestions, I will need some time to try them all and give you proper feedback.
    See more | Go to post

    Leave a comment:


  • PPelle
    replied to Huge date bug?
    No, one solution the article recommends is this:



    Subtract 1 min from line two and three, and you will get an False where it should be True. Try yourself in the Immediate window....
    See more | Go to post

    Leave a comment:


  • PPelle
    replied to Huge date bug?
    Say I have this date in a table, 11/21/2013 2:30:00 PM, calculated with DateAdd. How can I search and find this date? It won't be found. I will have to loop through all the relevant records and use DateDiff to compare each with the search date.

    This is not expected behaviour according to this KB: http://support.microsoft.com/kb/210276
    See more | Go to post

    Leave a comment:


  • PPelle
    started a topic Huge date bug?

    Huge date bug?

    Short story: Adding 30 min to 2:00 PM doesn't equal 2:30 PM.

    Try this code:

    Code:
    Dim dTemp1 As Date
    Dim dTemp2 As Date
    
    dTemp1 = #11/21/2013 2:30:00 PM#
    dTemp2 = #11/21/2013 2:00:00 PM#
    dTemp2 = DateAdd("n", 30, dTemp2)
    
    If dTemp1 = dTemp2 Then
        Debug.Print "ok"
    Else
        Debug.Print dTemp1 & " <> " & dTemp2
    ...
    See more | Go to post
No activity results to display
Show More
Working...