Jumat, 06 April 2012

[MS_AccessPros] Re: Hard coding a character return in MS Access 2003 Query

 

Hi John,

I just tested the query and discovered that the
Constant, vbCrLf, is not recognized in the query field.

Instead you will need to use,

ColumnName: FirstPart & Chr$(13) & Chr$(10) & SecondPart

Sorry for not checking it the first time.

Regards, Clive.

--- In MS_Access_Professionals@yahoogroups.com, "Clive" <zctek@...> wrote:
>
> Hi John,
>
> I think Bill was expecting you to work it out <g>.
>
> If you are doing it a query, which is what I would
> expect, then you need:
>
> ColumnName: FirstPart & vbcrlf & SecondPart.
>
> Or use the Function from my previous post.
>
> Regards, Clive.
>
> --- In MS_Access_Professionals@yahoogroups.com, "jfakes.rm" <jfakes@> wrote:
> >
> > Bill, thanks for sending this. Is there a way to put it one field instead of two?
> >
> > --- In MS_Access_Professionals@yahoogroups.com, "Bill Mosca" <wrmosca@> wrote:
> > >
> > > John
> > >
> > > The first piece: Left([MyField],instr([MyField],"/"))
> > >
> > > Second piece: Mid([MyField],instr([MyField],"/")+1)
> > >
> > > Regards,
> > > Bill Mosca, Founder - MS_Access_Professionals
> > > http://www.thatlldoit.com
> > > Microsoft Office Access MVP
> > > https://mvp.support.microsoft.com/profile/Bill.Mosca
> > >
> > >
> > >
> > > --- In MS_Access_Professionals@yahoogroups.com, "jfakes.rm" <jfakes@> wrote:
> > > >
> > > > I have a feild that a user now wants to split into two different fields in a report. I don't have the option of using two different fields in a table as it is one field.
> > > >
> > > > For example 12345/67899 needs to look like:
> > > > 12345/
> > > > 67899
> > > >
> > > > The lengths of the fields can vary for example I could have 1/3, or 12/123, or 1/ (yes thats a blank or null), and there might not be anything in the field at all.
> > > >
> > > > In a query, how can I code a hard return after the "/", taking into account that there might not be a fraction (null) in the field.
> > > >
> > > > Thanks in advance,
> > > > John F
> > > >
> > >
> >
>

__._,_.___
.

__,_._,___

Tidak ada komentar:

Posting Komentar