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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by IamreallyStuck

  1. IamreallyStuck

    Problem using 'Replace' to trim string

    Thank you for your help Simon, The query is working fine now : ) Lee.
  2. IamreallyStuck

    Problem using 'Replace' to trim string

    I am using this in a query field: BracketsRemoved: SwapStuff([BracketString]) The problem is that sometimes BracketString is empty, sometimes not. Lee : )
  3. IamreallyStuck

    Problem using 'Replace' to trim string

    Thanks for your reply Simon, My module now looks like this: Option Explicit Function SwapStuff(myStr As String) As String Dim strHolder As String If Not IsEmpty(myStr) And Not IsNull(myStr) Then If Len(myStr) > 0 Then strHolder = Replace(myStr, "[", "")...
  4. IamreallyStuck

    Problem using 'Replace' to trim string

    Hello, I have a module that strips square brackets from any strings which may contain them. It works fine, unless the string passed into the function is empty, in which case the function returns '#Error'. I've tried to rewrite it to stop this from happening, but i'm new to Access and VBA so I...
  5. IamreallyStuck

    Substitute text in string

    Thanks for your help Paul, it's working perfectly now! Lee : )
  6. IamreallyStuck

    Substitute text in string

    Paul, Just hit a snag - wonder if you could help with this? The code that you gave me is fine - unless the 'For' field in the table doesn't contain the word 'for'. In these situations your code cuts off the first 4 characters in the field. Is it possible to sort this out with some kind of IIf...
  7. IamreallyStuck

    Substitute text in string

    Works like a dream, thank you : ) p.s. I changed the number in the MyValue field to 3 to get rid of the whole word 'for'. Thanks again, Lee.
  8. IamreallyStuck

    Substitute text in string

    Thanks Paul, What you're suggesting seems fine, but i'm getting errors when I try to run it. My module looks like this: Option Explicit Function SwapStuff(myStr As String) As String Dim strHolder As String strHolder = Replace(myStr, "[", "") SwapStuff = Replace(strHolder...
  9. IamreallyStuck

    Substitute text in string

    Hi, I'm having trouble with using 'Substitute' in my query. I have a table containing two fields, 'Squares' and 'For'. 'Squares' contains text enclosed in square brackets, and I want to get rid of the square brackets but keep the rest of the string. 'For' sometimes contains the word 'for'...
  10. IamreallyStuck

    Conditional field display problem

    I've managed to figure out why it wasn't working - I was typing the SQL into the criteria box instead of into the SQL view! So, everything is fine now : ) Thanks very much for your advice, Lee.
  11. IamreallyStuck

    Conditional field display problem

    Thanks for the tip Neal, I've tried this, but when I try to run the query I get the following error message that I don't understand: 'You have written a subquery that can return more than one field without using the Exists reserved word in the main query's FROM clause. Revise the SELECT...
  12. IamreallyStuck

    Conditional field display problem

    I am new to Access, so this may be easy to do, but it has got me stuck! I have two fields in a table: 'FilmTitle' and 'Responsibility' The 'Responsibility' field contains details about Film directors, producers, actors, etc. What I need is that if the 'Responsibility' field for a record...

Part and Inventory Search

Back
Top