I have this happening in my access database . i am new to access and have aviheive alot from errors... one more thing the record id which is a autonumber has now given me (335648925) not smaller numbers.
Private Sub cmdPickPart_Click()
Dim strPart As String
strPart = InputBox("Enter a Part Number - i.e., 206-160-253-001")
If strPart <> "" Then
lstParts.RowSource = "SELECT IDRECORD, tblPart.PARTNUMBER, [IDTRACKING], [SERIAL NUMBER], Description FROM tblPartCategory INNER JOIN TBLPART ON tblPartCategory.PartNumber = TBLPART.PARTNUMBER WHERE (((tblPartCategory.QTYONHAND) > 1)) AND tblPart.PARTNUMBER = '" & strPart & "' ORDER BY TBLPART.PARTNUMBER"
'lstParts.Requery
End If
End Sub
Private Sub cmdUsePart_Click()
Dim RecordNo As Integer
Dim strPart As String
Dim strtracking As String
Dim strSerial As String
Dim strDesc As String
RecordNo = lstParts.Column(0) (stops here)
strPart = lstParts.Column(1)
strtracking = lstParts.Column(2)
strSerial = lstParts.Column(3)
strDesc = lstParts.Column(4)
[frmSaleDet2].Form![PartNo] = RecordNo
[frmSaleDet2].Form![PartNumber] = strPart
[frmSaleDet2].Form![IDTRACKING] = strtracking
[frmSaleDet2].Form![Description] = strDesc
[frmSaleDet2].Form![Qty].SetFocus
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
End Sub
Private Sub cmdPickPart_Click()
Dim strPart As String
strPart = InputBox("Enter a Part Number - i.e., 206-160-253-001")
If strPart <> "" Then
lstParts.RowSource = "SELECT IDRECORD, tblPart.PARTNUMBER, [IDTRACKING], [SERIAL NUMBER], Description FROM tblPartCategory INNER JOIN TBLPART ON tblPartCategory.PartNumber = TBLPART.PARTNUMBER WHERE (((tblPartCategory.QTYONHAND) > 1)) AND tblPart.PARTNUMBER = '" & strPart & "' ORDER BY TBLPART.PARTNUMBER"
'lstParts.Requery
End If
End Sub
Private Sub cmdUsePart_Click()
Dim RecordNo As Integer
Dim strPart As String
Dim strtracking As String
Dim strSerial As String
Dim strDesc As String
RecordNo = lstParts.Column(0) (stops here)
strPart = lstParts.Column(1)
strtracking = lstParts.Column(2)
strSerial = lstParts.Column(3)
strDesc = lstParts.Column(4)
[frmSaleDet2].Form![PartNo] = RecordNo
[frmSaleDet2].Form![PartNumber] = strPart
[frmSaleDet2].Form![IDTRACKING] = strtracking
[frmSaleDet2].Form![Description] = strDesc
[frmSaleDet2].Form![Qty].SetFocus
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
End Sub