strings (1 Viewer)

sphere

Registered User.
Local time
Today, 09:45
Joined
May 21, 2001
Messages
19
hello,
someone please help me, i've never used strings before.
i have a field in a form called "department" which i want
to concatenate with option group "location".
this is the code i was using in the after update event.

Private Sub Location_AfterUpdate()
Dim strLocation As String
Select Case grpLocation
Case 1
strLocation = "NY"
Case 2
strLocation = "UK"
Case 3
strLocation = "HK"
End Select
Me!Department=Me!Department&"-"&strLocation
End Sub

unfortunatly it doesn't work. can somebody please tell me
why and what should i do to get it to work.
thanks
=)
.
 

pcs

Registered User.
Local time
Today, 03:45
Joined
May 19, 2001
Messages
398
think i may see some other problems, but try this first:

last line should be

Me![Department] = Me![Department] & "-" & strLocation

(your after update code refers to the control [Location] and your option group is [grpLocation]...but that may be what you intend.)


hth,
al


[This message has been edited by pcs (edited 07-30-2001).]
 

Users who are viewing this thread

Top Bottom