End of Statement Error (1 Viewer)

majid.pervaiz

Registered User.
Local time
Today, 10:17
Joined
Oct 15, 2012
Messages
110
Dear All,

I have a form which has certain drop-down, based on the value in drop-down I am concatenating them to a new field.

the below is the code but it is giving me an error on serial "Expected : End of statement"

Me.Ref_No.Value = Cntry & "/" & Ctgry & "/" & Lng & "/" serial

please note that serial is also a text field but there is no drop-down on the form for serial but yet I did the below in code

Dim Cntry As String
Dim Ctgry As String
Dim Lng As String
Dim serial As String

serial = Me.Serial_No.Value

appreciate your expert advise

other thing for my knowledge, if the data type of serial_no field is number can we concatenate also ? like by & "/" me.serial_no.value
 

namliam

The Mailman - AWF VIP
Local time
Today, 09:17
Joined
Aug 11, 2003
Messages
11,695
Try:
Code:
Me.Ref_No.Value = Cntry & "/" & Ctgry & "/" & Lng & "/" [B][U]&[/U][/B] serial
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:17
Joined
May 7, 2009
Messages
19,230
you define serial there as string, so if in your form there is no value (possible zero length string, or null).

serial = Me.Serial_No.Value & ""

...
...
Me.Ref_No.Value = Cntry & "/" & Ctgry & "/" & Lng & "/" & serial
 

Users who are viewing this thread

Top Bottom