Search results

  1. J

    Issue with line continuation when running SQL in VBA

    Hi CJ, thanks for the catch, it works perfectly! Cheers, John
  2. J

    Issue with line continuation when running SQL in VBA

    Thanks Ranman256, I guess it is true that there's more than one way to skin a cat. For the record I would just like to confirm that I have never ever skinned a cat, do not ever intend skinning cats, or condone the skinning of cats.
  3. J

    Issue with line continuation when running SQL in VBA

    Hi All, If a run the following SQL string from within VBA and the string is all on one line, it works fine:- SQL = "UPDATE tblContactImport INNER JOIN Customers ON tblContactImport.cuco_Company = Customers.cu_ID SET tblContactImport.cuco_NewPhone = Mid(Customers.cu_PhoneNumber,1,5)+'...
  4. J

    Trying to include Date function in new table name in SELECT INTO query

    Hi CJ, thanks for your advice and I accept that the general consensus from those in the know is to concentrate on VBA and don't waste too much time with macros (except when needed like autoexec). However, as you mentioned in your post Macros are required when developing web apps and at this...
  5. J

    Trying to include Date function in new table name in SELECT INTO query

    Thanks for the advice Minty! Cheers John
  6. J

    Trying to include Date function in new table name in SELECT INTO query

    Hi CJ, thanks for that and I have taken note of your advice on table names! I was hoping to avoid the use of VBA as as I mentioned in a previous post which you helped me with, I'm just trying to do updates to data running SQL from within a Macro. I had already considered using the docmd.Copy...
  7. J

    RunSQL Macro Command

    Oh I see, thanks for the explanation Cj and to be honest I didn't even know that Access could do that. As for Macros, yeah although I did a bit of work with Access back in 2007 I haven't touched it since, so as I'm starting to use it again I wanted to get a feel of it's basic objects first...
  8. J

    Trying to include Date function in new table name in SELECT INTO query

    Hi y'all I'm trying to use a SQL SELECT INTO statement to back up the table tblContactImport into a new table with the same name albeit with today's date stuck on the end :- for example if I ran the query to back up tblContactImport today, then I would like the new table to be called...
  9. J

    RunSQL Macro Command

    Hi All, I currently have a macro, that using the OpenQuery macro action, runs a number of update queries. However, as my database expands I do not want endless queries clogging up the navigation pane, so after finding out about the RunSQL macro command, I wish to copy the SQL statement for each...
  10. J

    Stripping spaces

    Cheers jdraw for not only solving my problem but for taking the time to explain it as well. You've been a massive help with all this and I appreciate your help. All the best, John.
  11. J

    Stripping spaces

    Thanks jdraw....Ok, 3 more I hope brief questions. 1. Would I place the expression Replace(c_PhoneNumber,"(","") in the Update To part of the Update query like I did with the fExtractStrt(c_PhoneNumber) expression/ 2. Do I have to use separate REPLACE expressions to remove each different...
  12. J

    Stripping spaces

    Hi jdraw thank you soooo much for your expert help, you've saved me a helluva lot of time and frustration. I did read one of the existing posts on a similar problem that suggested using the REPLACE function, but I looked at the Access help on the topic and couldn't make much sense of it. Out...
  13. J

    Stripping spaces

    Thanks CJ_London
  14. J

    Stripping spaces

    Hi jdraw I don't quite understand how it works, but it works a treat!! So, how do I now update the values?
  15. J

    Stripping spaces

    Many thanks for your help with this jdraw, I'll have a crack at it and let you know how I get on. Cheers, John
  16. J

    Stripping spaces

    Hiya, I only want numeric characters, so 0 to 9 and I want there to be no spaces. The trouble is I have values such as "0208 941 5998" or "(0207) 996 2255" or "01465-279-221" or variations on these. Because I import data at various times, I would like to automate the process whereby a query...
  17. J

    Stripping spaces

    Hi All, I have a table - tblCustomers that contains the text field c_PhoneNumber that surprise surprise holds phone numbers. The trouble is that many of the records contain non-numeric characters such as hyphens and brackets as well as spaces. I would like to strip all of these out with an SQL...
  18. J

    Pop Up comments field

    Thanks a million Ken, that worked a treat !!
  19. J

    Pop Up comments field

    Hi All I have a textbox - Forms![FrmPGFinal]![txtComments] that is bound to [tblPGFinal]![Comments], which has a Memo data type. I have an unbound pop up form - Forms![frmPopUpComments] with a single text field – [txtInsertComment]. There is also a command button – cmdOK. When I open the...
Back
Top Bottom