User Profile
Collapse
-
Yes, you're right, I had to make a guess. :) Sorry about that, I didn't see your reply before a made mine. -
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
Code:Dim strBookmark as String strBookmark=Me.Bookmark Me.Requery
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?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 FunctionLeave a comment:
-
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.Leave a comment:
-
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
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?Leave a comment:
-
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\#")...Leave a comment:
-
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.Leave a comment:
-
Remove the first and the last ", like this:
Code:DoCmd.PrintOut Application.Printers("HP Deskjet 3050A J611 series (Copy 1)").Orientation = acPRORLandscape
Leave a comment:
-
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.... -
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.Leave a comment:
-
Thanks for all suggestions, I will need some time to try them all and give you proper feedback.Leave a comment:
-
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....Leave a comment:
-
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/210276Leave a comment:
-
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
No activity results to display
Show More
Leave a comment: