Search results

  1. pr2-eugin

    text box to show time taken

    You would exactly the same, as you just mentioned. Public Sub yourSubName() Dim stTime As Date, endTime As Date Dim totSec As Long, totMin As Long Dim elapsedTime As String stTime = Now() ' 'All your code in between ' endTime = Now() totSec =...
  2. pr2-eugin

    open report vba filter

    But namliam, you were spot on the swapping of names. ;)
  3. pr2-eugin

    open report vba filter

    Maybe? DoCmd.OpenReport "MonthlyData2", acPreview, , _ "YEAR(CourseDate) = '" & Me.txtCourseDateMonth & _ "' AND MONTH(CourseDate) = '" & Me.txtCourseDateYear & "'"
  4. pr2-eugin

    Access 2007 on Cloud

    Moved to appropriate section.
  5. pr2-eugin

    Dont let form close if date not filled in

    When you say it fails to keep the form from closing makes very little sense, as the code should work normal. Is there any other place where you are closing the form? Or any more code that you might have missed? Other option is to make sure that the On Close event is defined. Option Compare...
  6. pr2-eugin

    cancel with message box

    Try BeforeUpdate event. Private Sub Business_BeforeUpdate(Cancel As Integer) If Me.Business = "TYPE 1" And Me.Case = "Sent Email" Then If MsgBox ("You really want to change this!!!", vbYesNo) = vbNo Then Cancel = True End If End If End If
  7. pr2-eugin

    case-insensitive text

    Option Compare is the statement you declare to tell the compiler what sort of comparison you wish to perform. The three values you can use are, Option Compare Binary Option Compare Text Option Compare Database Option Compare Database, is specifically for Access. If you want to make sure it...
  8. pr2-eugin

    Code Help Please

    The reason for your error is because of the fact you are using a Dlookup to an Integer. DLookup can return a Null value, which is not compatible with any Data Type other than Variant. So you have to make use of a Nz() function. Other than that, your code could be simplified by using just one...
  9. pr2-eugin

    My search form displays blank table

    Deleted duplicate Thread. Please refrain from posting the same question multiple times.
  10. pr2-eugin

    VBA autocomplete based on %

    Hello johnsm1981, Welcome to AWF :) This is quite easily achievable. Need a bit of math to get the numbers right. In a form, maybe with two textbox enter the numbers 60, 40 in the text box and on a click of the button run an update Query. Something like. Dim user1Num As Long, user2Num As Long...
  11. pr2-eugin

    Generate Query Definition

    Unless you save this Query as a Temporary Query, the only way to do is, MsgBox CurrentDb.OpenRecordSet("SELECT Count(*) FROM (" & strSQL & ") As tmpQry WHERE tmpQry.Deceased = False").Fields(0)
  12. pr2-eugin

    Query Results from Mainform to Subform.

    I am a bit cloudy with your requirement. Could you explain the Form setup? I have strange feeling the solution you need is the second option I mentioned. As you can enter the Number here anytime, and the Query will work the same way as you have currently, except it will not ask for the...
  13. pr2-eugin

    Error 7878 "The data has changed" after an afterupdate event

    Why this complication? Could it not use a Bound Form? Why Unbound and so much code?
  14. pr2-eugin

    Query Results from Mainform to Subform.

    Since your SQL asks for a parameter, you have three options. First option, which you are currently doing, entering it manually. Second option, is to create a Form that will get the Delivery Note Number and your SQL to be modified as, SELECT [Consolidated Orders].Driver...
  15. pr2-eugin

    Command button to open desktop folder

    You're Welcome ! Good luck. :)
  16. pr2-eugin

    Command button to open desktop folder

    Jon, when you say open a Folder you mean simple Open the Explorer or Open Folder to select file using Code? I am pretty sure Application.FollowHyperlink "C:\Users\JONATHAN\Desktop\CMS FILES\"Should be able to open it.
  17. pr2-eugin

    Query Results from Mainform to Subform.

    What is the SQL of the Query you are using? Why is that prompting in the first place? To make sure the SubForm gets the Data according to the Main Form, make sure the Parent and Child ID are linked.
  18. pr2-eugin

    Searching Access

    Hello SkankyDog, Welcome to AWF :) Please do not post Question in the Introduction Area. I have moved your question to a more appropriate category. I am sure someone will be along shortly to help you. Good luck !
  19. pr2-eugin

    Test for null date

    Did you try IsNull function?
  20. pr2-eugin

    Test for null date

    Please do not post Questions in "Introductions", I have moved it to the right category. Hello hduvall, Welcome to AWF :) Where are you trying this? Query ? Code? If the Date field contains a Date it is not going to be Null. So Testing If it has a Date and Is not Null is logical absurdity. If...
Back
Top Bottom