Rabu, 17 Juli 2013

RE: [MS_AccessPros] vbCrLf

 

Hi Kevin

vbCrLf (and other similar constants) can only be used in VBA code, not in
query expressions (which include the expressions in calculated controls)

Instead, you must use the Chr() function. vbCrLf consists of two characters
- a "carriage return" (CR) which is Chr(13) and a "line feed" (LF) which is
Chr(10). So you need an expression like this:

=[HotelName] & Chr(13) & Chr(10) & [HotelAddress] & Chr(13) & Chr(10) &
[HotelPhone]

Best wishes,
Graham

------------------------------------------
Graham Mandeno
Microsoft Access MVP 1996 - 2013

> From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of qingqinga
> Sent: Thursday, 18 July 2013 6:39 p.m.
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] vbCrLf
>
>  
> Dear All,
> I have an unbounded textbox, I wrote something like: "=[HotelName] &
vbCrLf & [HotelAddress] & vbCrLf & [HotelPhone]", and I am expected to get
the hotel information as following:
>
> HotelName
> HotelAddress
> HotelPhone
>
> for example:
> XXX Hotel
> XXX Road,XXX City, China
> 0086-12345478
>
> My problem is that "vbCrLf" doesn't work as "another line". Please help.
Thanks.
>
> Best Regards,
> Kevin

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar