K
Karen
i have the following code on an On Exit of a control. When I enter data in
the cusno control and tab off of it I get an error that reads "Run time
error '2001': You cancelled the previous operation."
Can anyone help figure out what it is that I'm doing wrong?
Thanks,
Karen
------------------
Dim varcustnumber As String
Dim varbillname As Variant
Dim varzeros As String
varzeros = "000000000000"
Dim varlen As Integer
varlen = 12 - Len([CUSTNO])
varcustnumber = Mid(varzeros, 1, varlen) & [CUSTNO]
varbillname = DLookup("[cus_name]", "dbo_arcusfil_SQL", "[cus_no] =
varcustnumber")
(when i pause the cursor over varcustnumber in the dlookup statement, the
value is shown as "000000000080", which is correct.)
the cusno control and tab off of it I get an error that reads "Run time
error '2001': You cancelled the previous operation."
Can anyone help figure out what it is that I'm doing wrong?
Thanks,
Karen
------------------
Dim varcustnumber As String
Dim varbillname As Variant
Dim varzeros As String
varzeros = "000000000000"
Dim varlen As Integer
varlen = 12 - Len([CUSTNO])
varcustnumber = Mid(varzeros, 1, varlen) & [CUSTNO]
varbillname = DLookup("[cus_name]", "dbo_arcusfil_SQL", "[cus_no] =
varcustnumber")
(when i pause the cursor over varcustnumber in the dlookup statement, the
value is shown as "000000000080", which is correct.)