Earlier, I think you said you got 10 as the length. MC63 MC63 is 9. Most
puzzling. What is the length of the field in table design, and what is the
longest ID value you have? If they are all 4 characters, you could change the
length to 4, and Access will truncate the field.
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Kirkland, WA)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of glcass58
Sent: Wednesday, February 29, 2012 6:54 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: leading or trailing spaces/characters??
Asc(Left(ID, 1)) returns 77 which I see is M.
When I copy to the clipboard it shows "MC63 MC63". When I copy a different
value, it pastes correctly- just one time. Why is MC63 twice?
Thanks again for your help.
--- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@...> wrote:
>
> Chr(51) is the number 3, which is what you would expect in a field containing
> "MC63".
>
> What does Asc(Left(ID, 1)) return?
>
> Also, open the table in Datasheet view, select the row containing MC63, copy
it
> to the clipboard, then paste it into a reply.
>
> John Viescas, author
> Microsoft Office Access 2010 Inside Out
> Microsoft Office Access 2007 Inside Out
> Building Microsoft Access Applications
> Microsoft Office Access 2003 Inside Out
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Kirkland, WA)
>
>
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of glcass58
> Sent: Wednesday, February 29, 2012 5:16 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Re: leading or trailing spaces/characters??
>
> That returns 51.
> Thanks
>
> --- In MS_Access_Professionals@yahoogroups.com, "Graham Mandeno" <graham@>
> wrote:
> >
> > ...and also:
> >
> > Asc(Right(ID,1))
> >
> > Best wishes
> > Graham [Access MVP 1996-2012]
> >
> > > From: MS_Access_Professionals@yahoogroups.com
> > [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Duane
> > > Sent: Thursday, 1 March 2012 11:38
> > > To: MS_Access_Professionals@yahoogroups.com
> > > Subject: [MS_AccessPros] Re: leading or trailing spaces/characters??
> > >
> > >
> > > What are the results from:
> > >
> > > Len(Trim(ID))
> > >
> > > Len(ID)
> > >
> > > Duane Hookom
> > > MS Access MVP
> > >
> > > --- In MS_Access_Professionals@yahoogroups.com, "glcass58" <glcass58@>
> > wrote:
> > > >
> > > > I can't figure this out.
> > > >
> > > > select id from table where id = "mc63" does not work
> > > > select id from table where id like "*mc63*" does
> > > >
> > > > I tried Trim([id]) and Replace([id]," ","") but they did not help.
> > > >
> > > > Any assistance would be greatly appreciated!
> > > >
> >
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
------------------------------------
Yahoo! Groups Links
Rabu, 29 Februari 2012
RE: [MS_AccessPros] Re: leading or trailing spaces/characters??
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar