Search results

  1. P

    Suspend Screen Painting During Form Updates

    Echo is for the complete database. me.painting is for the current form (the form from where the code is started). There should only be one method in your code, I would go for me.painting, as it is form based.
  2. P

    Suspend Screen Painting During Form Updates

    For a form the painting property should do the trick. To disable all screen output we have the echo command. Private Sub Form_AfterUpdate() Dim strBookMark As String 'currently no errorhandler defined. me.painting = false echo false DoCmd.Hourglass (True) 'added this to show...
  3. P

    VBA to create PDF and folder if doesn't excist

    Oops missed that. You have the send mail part in the else part of your dir test. If a directory is created no mail wil be send.
  4. P

    VBA to create PDF and folder if doesn't excist

    If the control "txtClient" contains characters that are not allowed in file/folder names it should not create the folder. If it's a long name and the path/filename exceeds 256 characters it wil result in the error you describe. To get the path of the database "currentproject.Path" is shorter...
  5. P

    help with vba with if statement

    Lagbolts code uses the filterstring as your original code did, you don't know if a filter is applied. I like the way lagbolts coding should work. So with the correct form property it looks like: Me.btnUnFilter.Visible = me.FilterOn
  6. P

    help with vba with if statement

    The string in me.filter holds the where part of the SQL, it has noting to do with the filter being applied. Your code should use the filteron property. if me.filteron then Me.btnUnFilter.Visible = True else Me.btnUnFilter.Visible = False end if This is only usefull on the onload...
  7. P

    concatenate rows from same column

    If there's only one column the result will be unpredictable in a database as the sort order is unkown (and why would you do it). If it's to concatenate the records based on other field(s) in the record you could try a crostabquery.
  8. P

    "Access can't append all the records..." through VBA

    I assume Vv_Trans is a numeric field. Formatting a number turns it in a string, that's why you get “Data type mismatch in criteria expression”. Why store a formatted number if you can format it when making a report or query?
  9. P

    Get date/time from internet

    Why not sync the computertime with a NTP server instead of coding it in VBA. See Microsoft knowledge base
  10. P

    newb question on arrays and vba

    First, the way you set your date value is wrong. 3 - 1 - 2001 = -1999, date is 07/10/1894 (mm/dd/yyyy). Your code doesn't write the values to the form, to do so you have to change it to something like: Private Sub Form_Open(Cancel As Integer) Dim Event_Date(2) As Date Event_Date(0) =...
  11. P

    Need help on DlookUp creteria

    Glad you solved it. Please use the code tags next time in stead of the quote tags as it makes code easier to read.
  12. P

    Need help on DlookUp creteria

    The Dlookup shouldn't be in the strSQL, what is the output of strSQL? What do you want to do with the dlookup, I expected to see someting like: strSql = "(RoomID=" & Me.RoomID & ") And (CheckInDate<#" ...rest of the string me.someControl = DLookup("BookingDetailsID", "tblBookingDetails", strSQL)
  13. P

    multiple commands in loop

    Your code seems okay, put a break in your code and step trough to see if the code is triggered twice. If it's triggered twice you can put a if statement around the printing and check if it's already send. if not(rs!CheckLetter1) then
  14. P

    multiple commands in loop

    You're code has no mail sending in it, testing on screen will only show one record. Printing should give more if you're not using subforms. I don't know what version of access you are using but a PDF is reader is on most systems available. From access 2007 output to PDF is supported. Native...
  15. P

    multiple commands in loop

    From the error you're getting you put "Movenext" before the wend, it should be rs.movenext (sory forgot it in my sample). I think you're preview won't work for multiple records as the code wil be running when showing the preview. That's the reason my sample uses shapshots and mail. In access2007...
  16. P

    problme with script for printing

    You need a space between [InvNum]" & "FROM. Putting a space between the quote and FROM should work.
  17. P

    Access date bugged?

    In VBA you need to format the date in US format. format(Me.zk_datum.Value, "mm/dd/yyyy")
  18. P

    multiple commands in loop

    Is this the actual code? From this code you would only change the current record because you're not changing records. Your email would contain the same info for all listed records as the're is no reportfilter. I would do it by looping a recordset like (untested code): Dim rs as doa.recordset Dim...
  19. P

    Validation rule

    You should use the before update event of the form to prevent saving of incomplete data. The after update event is after saving it in the DB so a user can go to the next record or exit the DB leaving incomplete records.
  20. P

    Open A report from Form

    You made the parameter a string, it should be: DoCmd.OpenReport stDocName, acPreview, , "[savingsid] = " & me.savingsid
Back
Top Bottom