Search results

  1. M

    Undefined Function error

    Looks like i have two functions with the same name.
  2. M

    Undefined Function error

    Hi All, I'm using this function: Public Function WorkingDay(StartDate As Date, NumberOfDays As Integer) As Date WorkingDay = Excel.WorksheetFunction.WorkDay(StartDate, NumberOfDays) End Function To find x number of working days from a date entered. I need this in a few places, one of...
  3. M

    Excel vba script stopping without error on cell value change

    Nevermind, I was calling the wrong sub routine after this operation.
  4. M

    Excel vba script stopping without error on cell value change

    Hi everyone, I have a bit of code that checks a number of fields in an excel sheet before finally saving it and creating a pdf of the file. I've had to amend the code slightly today in order to cater for a new clients requirements. However, when running the scripts, it stops after changing a...
  5. M

    Working out Invoice due dates

    Hi Everyone, thanks for the help with this. My error was generated from passing the wrong info to the function. Please consider this solved.
  6. M

    Working out Invoice due dates

    I've included your function in a module and have a query with the expression DUE DATE: CalcDue([TaxDate],[PaymentTerms]) however when i view the query results I have a strange scenario: The invoice number relates to 4 records in another table. the tax date is associated with the invoice...
  7. M

    Working out Invoice due dates

    Thanks for the additional advice. Excuse my ignorance, but how would I use the function in an expression?
  8. M

    Working out Invoice due dates

    Thanks for that! Assuming that the Case number needs to relate to the TermID: Function CalcDue() Select Case TermID Case 1 '30 days EOM CalcDue = "DateSerial(Year([TaxDate]), Day([TaxDate]) + 30, 1) - 1" Case 2 '60 days EOM CalcDue = "DateSerial(Year([TaxDate])...
  9. M

    Working out Invoice due dates

    Hi Ash, My apologies, I thought I had it licked. I have a table that has my terms in, two fields, TermID and PaymentTerms for example TermID is 1 and paymentTerms is 30 Days EOM There are a total of 13 available payment terms. in order to correct the date value displaced in the query I would...
  10. M

    Working out Invoice due dates

    Hi All, I'm trying to work out some invoice due dates. I have the following code: DUE DATE: Format(IIf([account terms]="30 days EOM",DateSerial(Year([TaxDate]),Month([TaxDate])+2,1),IIf([account terms]="60 days EOM",DateSerial(Year([TaxDate]),Month([TaxDate])+3,1),[TaxDate])),"Short Date")...
  11. M

    Help withExcel VBA code

    I'm sure this is messy, but works: Sub SAVEREPORTANDPDF() Dim filename As String Dim path As String Dim Cust As String Dim pdfpath As String Dim Iret As Integer path = "R:\" filename = Range("AU10").Value & ".xlsm" ' sets the filename to the value of cell AU10 and adds the extension Cust =...
  12. M

    Help withExcel VBA code

    Thanks for this guys. I'm now trying to work in a handler to overwrite an existing file based on the Ignore button being pressed only now it wont save unless the file exists... Sub SAVEREPORTANDPDF() Dim FileName As String Dim Path As String Dim iret As Integer Path = "R:\" FileName =...
  13. M

    Help withExcel VBA code

    tidied up code if any use to anyone in the future: Sub SAVEREPORTANDPDF() Dim FileName As String Dim Path As String Path = "R:\" FileName = Range("AU10").Value & ".xlsm" ' sets the filename to the value of cell AU10 and adds the extension If Dir(Path & FileName) <> "" Then 'checks for...
  14. M

    Help withExcel VBA code

    It throws me an else without if error: Sub SAVEREPORTANDPDF() Dim FileName As String Dim Path As String Path = "R:\" FileName = Range("AU10").Value & ".xlsm" If Dir(Path & FileName) <> "" Then MsgBox "File Exists" Else 'save the excel file Path = "R:\" ' FileName = Range("AU10").Value &...
  15. M

    Help withExcel VBA code

    Good afternoon, Apologies for this being excel and not access, I was hoping someone could point me in the right direction. I'm trying to break up a save and create pdf module to check for the existence of the file it's about to create. I've managed to get a cell to display TRUE or FALSE if the...
  16. M

    Event to match up previous entries and insert matching data

    Good morning all, I've had large amounts of help on here to further develop our badly designed database :-) The next stage I'd like to include is a match and enter pricing details. We get a lot of repeat work that is entered onto our system, due to the nature of the work we do each item is...
  17. M

    Help with an If statement..

    changing [Inv No] is null to Isnull ([Inv No]) worked. TVM once again :) The Like "BRO001" could be = BRO001 as this is a unique identifier to the customer. But I understand the need for the enclosed *
  18. M

    Help with an If statement..

    Morning all. I'm trying to place an if statement in an afterupdate event on a form. the code I have is If [Customer] Like "BRO001" And [Inv No] is null Then [Job_Price] = [Shots] * 27.5 this gives me a run time error, object required and highlights If [Customer] Like "BRO001" And [Inv No]...
  19. M

    Check data on new record entry

    HI Minty, I understand that would be a better way, but duplicates are reasonably infrequent, and sometimes are required. Although they appear often enough to warrant some thought. It wouldn't justify checking the serial numbers for duplicates on every line item, hence letting access do the...
  20. M

    Check data on new record entry

    Thanks for the response, We are now not getting an error, but the form opens and a filter is applied, but not to anything worthy (how do we check where and what has been filtered?) I feel I need to point out the the new line is being booked in for jobregisterbookingin, the code is running on a...
Back
Top Bottom