Update Query to 'strip' - not working in Office 2007??

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi there,
Have a large SQL file with a field (Name) which has the first and last
name separated by a ~ . I want to 'strip' out the first and last name
into their own fields.

I went into the TABLE and 'added' fields of 'FirstName' and 'LastName'
and also Organization (about 100 entries are not names but Companies)
and then used a previously successful query (as follows):

It is an 'update' query - or so it seems from what I understand about
2007 Access.

Under FirstName in the UPDATE TO cell enter the formula
TRIM(Left([tblName].[FieldName],Instr(1,[tblName].[FieldName],"~")))

UnderLastName enter the formula
TRIM(MID([tblName].[FieldName],1+Instr(1,[tblName].[FieldName],"~")))


Under the FieldName in the criteria enter Like "*~*"

Select Query: Run from the menu

When I run it, a PROMPT asks for a 'parameter' entry for the
tblname:fieldname and I'm not sure how to answer that - I believe that,
even though this worked in 2003 (no longer available) I'M DOING
something wrong here.

Appreciate any and all help. Thank you.

Doc
.



Relevant Pages

  • Removing/replace special character in a field
    ... The database is also FTP to our web site ... replace in the query but they are not recognized as a valid function. ... Is there a simple way to strip out the & in the name field within the ...
    (microsoft.public.access.queries)
  • Re: Strip field data of quotation marks
    ... Set AddrLine1 = Mid ... Strip Trailing quote ... If you can only build queries in query view then here is a hint on doing the first query. ...
    (microsoft.public.access.queries)
  • Re: Datepart Function
    ... Use DateValueto strip off the time to strip off the ... Allen Browne - Microsoft MVP. ... >I wanted to know if you can use the datepart function in a query to extract ... > have a query that asks users for to input a date. ...
    (microsoft.public.access.queries)
  • Re: Carriage Returns - remove
    ... > thier are any strip them out? ... > I am only a basic user of access and use the query window to filter my data, ... Public Function RemoveReturns([FieldIn as String) as String ...
    (microsoft.public.access.queries)
  • Re: Date format in query
    ... Sandy wrote: ... to write a query that Deletes all records where the date is today's date and ... in other words, strip the time off of the DateTime ... MVP ...
    (microsoft.public.access.queries)