C
clk
Hi. I had the following code working for a database:
Dim strSQL As String
Dim intCount As Integer
Dim db As DAO.Database
Set db = CurrentDb
strSQL = "INSERT INTO qryPartSerialNumber " _
& "(PartID, RevNumber, SerialNumber) " _
& "SELECT " & Me.PartID & ", " & "('" & Me.RevNumber & "')" _
& ", N + " & Me.StartingSerial & " FROM Num " _
& "WHERE N < " & Me.[Quantity] & ";"
db.Execute strSQL, dbFailOnError
The problem is now I need to make the "Serial Number" number field a
text field because we need to keep the leading zeros entered. Any
help would be greatly appreciated. I tried changing the table fields
to text but then I get a "data type mismatch" error.
Not sure how to make this work. Thanks.
Dim strSQL As String
Dim intCount As Integer
Dim db As DAO.Database
Set db = CurrentDb
strSQL = "INSERT INTO qryPartSerialNumber " _
& "(PartID, RevNumber, SerialNumber) " _
& "SELECT " & Me.PartID & ", " & "('" & Me.RevNumber & "')" _
& ", N + " & Me.StartingSerial & " FROM Num " _
& "WHERE N < " & Me.[Quantity] & ";"
db.Execute strSQL, dbFailOnError
The problem is now I need to make the "Serial Number" number field a
text field because we need to keep the leading zeros entered. Any
help would be greatly appreciated. I tried changing the table fields
to text but then I get a "data type mismatch" error.
Not sure how to make this work. Thanks.