Search results

  1. P

    extract the price from a string

    I have a string which is built up with a calculate button and is displayed in a label: The Price is: £ 985 Per Product Me.LblCost.Caption = "The Price is: " & "£ " & CStr(Price) & Strpriceduration this gives me the cost per product, some products are priced per week and I wanted to calculate...
  2. P

    case statement not working

    case statement Thanks to everyone who contributed especially as it was a bank holiday weekend, Your assistance helped me reach the solution. thank you so much. regards Peter
  3. P

    case statement not working

    case I was thinking about that route but unfortunately they were created at different times so where: case 1 to 10 case 11 to 20 ... would have done the trick now it would mean an individual case for each one. I suppose I could copy the groups to a new table and then rename it. BUT thank...
  4. P

    case statement not working

    case problem I like your solution however it just highlights in red: Select Case Product Case like "Summer Groups Residential*" end select this would be the ideal solution though any other ideas? regards
  5. P

    case statement not working

    I have the following code that I hoped would use the left function to determine if a part of the string contained another string and then take the appropriate case but it doesnt work. product is the full description select case product Case Left(Product, 29) = "Summer Individual Residential"...
  6. P

    help with my function

    function problem Thanks to everyone. It now functions correctly. Many regards Peter
  7. P

    help with my function

    function problem In answer to the question I have altered it as I only need to pass in the date of birth, its the second function that takes date of birth and a secondary date to give me the persons date of birth on 31st of august in the preceeding year to the current year. I am calling the...
  8. P

    help with my function

    function problem Hi Brian thanks I took your advice and made the changes but its still returning the same error. Public Function getLearndirectAge(Dob As String) As Integer Dim dobIn As String Dim dobOut Dim StrPreviousYear, StrAugust As String 'get the date of birth and pass to variable...
  9. P

    help with my function

    I ahve a function that prepares a date for a get age function but mine is complaining : compile error byref argument type mismatch. I can see why I have the error but I am not sure how to correct it. regards Peter Public Function getLearndirectAge(enrolmentdate As String, Dob As String) As...
  10. P

    test age range with iif function

    age range yes that is exactly what i want to do, should i place a public function in a module and then pass dob to the grid? i guess select case input case >=11 and <=15 code here case >=16 and <= 17 case >=18 end select some code to return variable regards
  11. P

    test age range with iif function

    I would like to have an iif function determine the age range of the person. I have in the query grid the dob and a column called age range and would like the following. age range: IIf(DateDiff("yyyy",[Date of Birth],Now())+Int(Format(Now(),"mmdd")<Format([Date of Birth],"mmdd"))>=11 and...
  12. P

    calculate number of working weeks between two dates

    I want to calculate the number of full working weeks (Monday to friday) between two dates. I want to ignore part weeks. I had a search online and on the forum but it didnt return anything. ex 1/7/05 to 31/7/05 would return 4 regards in advance peter
  13. P

    opposite to ABS function

    Is there a function to force a positive value to negative? pass 2 returns -2 regards
  14. P

    Form updates with carriage return

    I have a bound form which opens as a new record. If I accidently press carriage return by mistake whilst entering it goes to another new record, how do I stop this behaviour? I only want the record to save with the click of a button. regards in advance Peter
  15. P

    event being triggered but not sure why

    In this instance I dont want the event to happen if a cell is selected its going to try and put a value in a cell when I save. I did read somewhere that controls from the design toolbar has issues with events being triggered adhock. should i try and create the control with a button and then...
  16. P

    event being triggered but not sure why

    I have a change event on a combo box that is being triggered after I have finished and try to save. The combo is used to lookup descriptions and place the error code in an excel cell. its generating error 91 runtime error as object variable not found: its the = Activecell.address line on the...
  17. P

    reference to objects in access and excel

    create new spreadsheet from template I have the following code below in my access code which allows me to take the random rows returned in a query and pass them to an excel spreadsheet this code is courtesy of Getz & Gilbert VBA developers handbook. What I cannot find is how to create a new...
  18. P

    reference to objects in access and excel

    access to excel Hi lagbolt I found lots of help to go get data from access to excel but not in access to excel the help hasnt helped. :(
  19. P

    recordset rows to new recordset

    thanks lagbolt good guidance and objective achieved
  20. P

    reference to objects in access and excel

    I have this code which references and opens the spreadsheet, now I would like to pass the recordset data to the fields but not sure how now I have reference to the excel object. Dim auditspreadsheet As Object Set auditspreadsheet = GetObject("c:\Audit.xls") some actions with recordset add...
Back
Top Bottom