Solved Data copied to the DB via a list box

Martyh

Registered User.
Local time
Today, 17:21
Joined
May 2, 2000
Messages
196
Hi Guys,

When the data is copied to the DB via a list box from an "external source" by using ctrl-C/V, how would I count the number of pieces of data that were imported to the db?

In the example, there are only 3 pieces of data, but in reality 300-400 are sometimes transferred. The amount would be used as a double check, because we know the amount in the external source, we just want to verify the amount going in.

Thanks,

Capture.JPG


Marty
 
Hi. How exactly are you using Ctrl-c/v?
 
is that a Listbox or a Textbox?
if textbox you can use it's Change Event to get the number

Code:
Private Sub txtNSN_Change()
    Dim var As Variant
    var = Split(Me.txtNSN.Text, vbNewLine)
    MsgBox UBound(var) + 1
End Sub
 

Users who are viewing this thread

Back
Top Bottom