Search results

  1. M

    problem with sendobject

    there is an option in the Outlook Office Menu>Options..>Trust Center>Trust Center>Trust Center Settings...>Progarmmatic Access> Never Warn Me This is dangerous though it will allow other programs to send mail through your account. Just a heads up.
  2. M

    Runtime Error 429 - ActiveX Component Can't Create Object

    There may be another way to accomplish this without having to use that reference. It requires a holoday table (tblHolidays) with Holdate as a datetime field. Function GetWorkDays(dtDateIn As Date, dtDateOut As Date) As Integer Dim x As Integer Dim rs As Recordset Dim db As Database Dim strSQL...
  3. M

    NETWORKDAYS for Access

    I forgot to close the rs at the end and set objects to nothing... Opps!
  4. M

    NETWORKDAYS for Access

    you may want to take a look at something I just came up with. test it to make sure. It requires a holiday table tblHolidays with a field HolDate (as datetime, shortdate). Function GetWorkDays(dtDateIn As Date, dtDateOut As Date) As Integer Dim x As Integer Dim rs As Recordset Dim db As...
  5. M

    Error Message On Creating Duplicate Record

    msgbox "Payroll ID " & me.payrollID & "already exsits."
  6. M

    Error Message On Creating Duplicate Record

    Good point linq. Its always the little things. This may be the best sugesstion.
  7. M

    Error Message On Creating Duplicate Record

    You can use this to retrn a True\False and call it: Public Function PayrollIDExists(Optional PayrollID As String) As Boolean Dim db As Database Dim rs As Recordset Set db = CurrentDb Dim strSQL As String User = GetUserName strSQL = "select payrollID from tblusers" Set rs =...
  8. M

    Why does emailing a PDF work, but saving a PDF doesn't?

    Glad you get 'er up and runnin. Keep it up!
  9. M

    get directory

    Sorry: I read it again and see that I didin't answer the question.targetdir = targetpath & RecNum & ChannelPartner & Enduser still holds the Full path.
  10. M

    get directory

    The True\False is checking to see if the string value of RecNum is anywhere in the the subdirectory name of the parent targetpath For instance, SubDirExists("C:\", "program") finds the "Program FIles" folder in C:\. Kinda like a wild card and returns true. Be careful beciase you are seeing if...
  11. M

    Runtime error 13 type mismatch

    Remove the quotes from DoCmd.OpenForm "frmContacten", , , "strCriteria" should be DoCmd.OpenForm "frmContacten", , , strCriteria
  12. M

    get directory

    Putting it all together: sub test() targetdir = targetpath & RecNum & ChannelPartner & Enduser Set filesys = CreateObject("Scripting.FileSystemObject") If filesys.FolderExists(targetdir) Then GoTo function_end if SubDirExists(targetpath, recnum) = True then GoTo function_end MkDir targetdir If...
  13. M

    get directory

    You can loop through all of the subdirectories of target path with this: SubDirExists(targetpath, recnum) Function SubDirExists(ByVal sDir, strMyCriteria as string) As Boolean Dim oFS As Object Dim oSub As Object Set oFS = CreateObject("Scripting.filesystemobject") Dim oDir Set oDir =...
  14. M

    Split Database

    Make sure that when you link the tables to the front end, tou use the UNC path instead of the mapped drive. \\myserver\dir\db1.accdb
  15. M

    Why does emailing a PDF work, but saving a PDF doesn't?

    have a look at this: http://www.access-programmers.co.uk/forums/showthread.php?t=204524 Then this: http://www.access-programmers.co.uk/forums/showthread.php?t=204478
  16. M

    Why does emailing a PDF work, but saving a PDF doesn't?

    Try removing the quotes in the Template file parameter: DoCmd.OutputTo acOutputReport, stReport, acFormatPDF, myPath & stCaption & ".pdf", False, , , acExportQualityPrint
  17. M

    Runtime error 13 type mismatch

    The "AND" conditions are not in the where condition as it is written above. You may want to try: dim strCriteria as string strCriteria = "" If IsNull(Naamtabel) = False And IsNull(plaatstabel) = False And IsNull(postcodetabel) = False And IsNull(telefoontabel) = False Then strCriteria = "Naam...
  18. M

    VBA 1004 error on second time through loop

    Looks like you are still manipulating sheet2 in the code. even on the second loop. "Sheet2.Range("A" & firstrow & ":AH" & lastrow & "").Select" are you wanting to activate the neext sheet in wbToAddSheetsTo ?
  19. M

    Why does emailing a PDF work, but saving a PDF doesn't?

    DoCmd.OutputTo acOutputReport, , acFormatXPS, myPath & ".xps", False should be DoCmd.OutputTo acOutputReport,stReport , acFormatPDF, myPath & ".pdf", False That should work for both versions.
  20. M

    Getting "datatype mismatch error" for Date

    THere was an error in DayNoQueries where the date was formatted as text. The result just trickled down through the outer queries. I have attached a resolution. I did not modify any data in the DB.
Back
Top Bottom