G
Guest
Im trying to automate the filling in of details in a form once a button is
clicked with this code.
If [Site] = "In House" Then
Me.txtLocation = "ABC (S) Pte Ltd" _
& vbCrLf & "Blk123, Clementi #01-23," _
& vbCrLf & "Singapore 123456"
ElseIf Me![Site] = "On Site" Then
Me.txtLocation = Null
End If
Docmd.Requery
The field that holds this detail is a listbox.
Strangely, the vbCrLf doesnt work and the whole address
"ABC (S) Pte Ltd Blk 123 ..."
still appears instead of
"ABC (S) Pte Ltd
Blk 123 ... "
I have tried char(13), vbNewline too but none of this work. I did I do wrong
here? Thanks in advance.
clicked with this code.
If [Site] = "In House" Then
Me.txtLocation = "ABC (S) Pte Ltd" _
& vbCrLf & "Blk123, Clementi #01-23," _
& vbCrLf & "Singapore 123456"
ElseIf Me![Site] = "On Site" Then
Me.txtLocation = Null
End If
Docmd.Requery
The field that holds this detail is a listbox.
Strangely, the vbCrLf doesnt work and the whole address
"ABC (S) Pte Ltd Blk 123 ..."
still appears instead of
"ABC (S) Pte Ltd
Blk 123 ... "
I have tried char(13), vbNewline too but none of this work. I did I do wrong
here? Thanks in advance.