Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Steve3110

    Populating Table Fields via Recordset Loop

    looking at the code, it is only ever going to populate the form with one record. It might run through all the records but each time it is going to replace the data on the form. What exactly are you trying to do?
  2. Steve3110

    When renaming a table I get an error message

    i'm at a loss then to be honest. If your positive that there is a table called "NewYears" when the macro is run, then i dont know what to suggest
  3. Steve3110

    When renaming a table I get an error message

    Hey Sorry i'm struggling to think of a solution. You could try replacing the code that runs the macro with: docmd.Rename "Years", acTable, "NewYears" That should do the same thing that the macro was doing but when it comes up to debug you should be able to debug easier.
  4. Steve3110

    VBA SUM spaces in string

    The function provided above would have given you the number of spaces but as SkipVought said, the Trim function will allow all spaces at the beginning and end to be removed: Example: dim str as string str = " Testing " output = trim$(str) Output would then equal "Testing
  5. Steve3110

    VBA SUM spaces in string

    just a slight correction: [code] Msgbox Len(r.value) - Len(Trim(r.Value)) & " spaces in " & r.Addrress [/code/ You need to get the length of the trimmed string
  6. Steve3110

    When renaming a table I get an error message

    What exactly does that macro consist of? Are you sure that the souce table to rename is spelt correctly? as i'm sure you can understand its a bit hard to fix code when its in a macro i cant see.
  7. Steve3110

    VBA SUM spaces in string

    What exactly do you mean by sum the spaces? Do you mean you want to count how many characters are spaces? Also, whats this needed for? Is there a specific need to count the spaces?
  8. Steve3110

    When renaming a table I get an error message

    Hi Which line do you get the error message on?
  9. Steve3110

    Change Currency Format in MS Access Query

    Try the following: SELECT KRTMSTR.CUSTDOD, iif(sum(KRTMSTR.OBL)>1000, "$" & str(format(KRTMSTR.OBL / 1000000, "0.00")) & "M", "$" & str(format(KRTMSTR.OBL, "0.00"))) AS [TLVAL] FROM CMODOAC INNER JOIN KRTMSTR ON CMODOAC.DODAC = KRTMSTR.CMODOD GROUP BY KRTMSTR.CUSTDOD; P.S. Sorry if it doesnt...
  10. Steve3110

    Copy field values from one record to a new record.

    You could use something like the following dim i as integer dim number as integer 'Whatever the record number that your copying is: number = 1 set rs = currentdb.openrecordset("select * from Table1 WHERE recordnumber = " & number ";") set rs2 = currentdb.openrecordset("Table2")...
  11. Steve3110

    Change Currency Format in MS Access Query

    Hi Could you put the tlval expression to something like the following: iif(sum([valuefield])>1000, "$" & str(format([valuefield]/ 1000000, "0.00")) & "M", "$" & str(format([valuefield], "0.00"))) Obviously [ValueField] is the field that you are needing to sum Steve
  12. Steve3110

    Problem refreshing data for pivot table

    I'm assuming you want to refresh the pivot table automatically? To do that you would need to use code similar to: WB.Sheets(1).pivottables(1).refresh
  13. Steve3110

    How to NOT allow Pivot Table to be saved on close

    You could always save the file with a "full access" password so it will force people to open as read only, therefore they wont be able to save unless they "save as
  14. Steve3110

    Error 424 & CreateObject("Excel.Sheet")

    Might sound like a silly question buy have you got the same version of office installed on all the computers? Also, have you tried the code with excel running in the background?
  15. Steve3110

    Multi Line Text Box

    If i'm understanding you correctly, you mean you need to enter multiple values against one record so you are using a multiline textbox and seperating by a character return? If this is the case, would it not be easier to store these multiple values in another table and link the multiple records...
  16. Steve3110

    Case Insensitive

    When you say you tried Ucase, how did you use it? The following should work: i = InputBox("Type Text or Number to be Searched") j = 0 For Each r In rng For iCol = 2 To 11 With Cells(r.Row, iCol) If ucase$(.Value) = ucase$(i) And j = 0 Then Steve
  17. Steve3110

    execute a query per code

    I believe the above answer is enough but just incase you didnt want the query to actually exist as an object, you could run the SQL statement that the query is running from by using Docmd.RunSQL function

Part and Inventory Search

Back
Top