Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chr() code for "CTRL+ENTER ket

Status
Not open for further replies.
Jan 21, 2001
5
0
0
US
I am trying to combine (display)address data into a single TEXT box (similar to OUTLOOKS address box in contacts).

The problem is that I need a CHR() for CTRL+ENTER. CHR(13) does not work. See below

Private Sub ZipCode_AfterUpdate()
[Text14].Value = Trim([Street].Value) & " " & ChrW(13) & Trim([City].Value) & ", " & Trim([State].Value) & " " & Trim([ZipCode].Value)
End Sub

Also, does Access 2000 have an equiv to Excel's "PROPER" function.

Thanks for anyone's help
 
VBcr and VBKeyReturn do not work. I need a way to send the equiv of pressing the 'CTRL' and "ENTER" keys. There must be ansi (Chr$) or vb constant that will do this.

Hopefully, somebody knows.
 
This is how I get several lines of information into a textbox or even a lable.

dim str as string
str = "Hi there" & vbNewLine _
& "How are you?" & vbNewLine _
& "That's nice."
me.textbox = str
or
me.lable.caption = str

Try it you will like it!

John

John A. Gilman
gms@uslink.net
 
You should be able to use the intrisic constants described above if you are using Access 95 or newer. However, Access 2.0 had to user Chr(10) & Chr(13) to achieve the same as vbCrLf which is used today. I believe vbNewLine provides an identical result as John said.

Steve King
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top