multiple serial numbers entries

sightsound

New member
Local time
Today, 21:28
Joined
Jul 3, 2019
Messages
4
Hi All,
I wonder if anybody can help?
I have Access 2016 and I’m trying to create an application for logging software serial numbers.


I want my form to have a combo box with the software application names in (Sounds easy so far) and a textbox where I can paste multiple serial numbers in, in one go. I then wanted to have a button I could click for it to create a different record in my table for each serial number with the name which is selected in the combo box.


I’m really struggling with this, so singed up today to the AWF, to see if anybody could shed so light on this and point me in the right direction.


I must point I’m new to Access.

Many thanks
James Oliver
 
if the serials are separated by a delimiter (comma or space), you can use the Split function to separate each serials. then loop through these serials to Insert it to the table.
on the Click event of your button (say button1):
Code:
Private Sub button1_Click()
Const strDelim As String = ";" 'supposing that your separator for serial is ";"
Dim varSerials As Variant
Dim varSerial As Variant
varSerials = Split(Me.textboxSerials, strDelim)
For Each varSerial In varSerials
Currentdb.Execute "Insert Into yourTable (appNameField, appSerial) Values ('" & _
Me.Combo & "', '" & varSerial & "');"
Next varSerial
End Sub
 
What you want to do is possible and there are several ways to do it.
But I wonder how you have several serial numbers for a software and so many software that you need a database to manage them.

Is it legal at all?
 
Hi James. Welcome to the forum. Another possible approach is if you already have the serials in Excel, you might be able to import them into an Access table.
 
Thanks arnelgp, that worked a treat.



Its all above board and legal. I work for a company setting up around 2500 pc a year installing software\hardware. We use excel to store all serial numbers currently but wanted to tidy things up a little.


Thanks for help, wow fixed so quickly. I will be back again with more questions for everybody I’m sure.
 

Users who are viewing this thread

Back
Top Bottom