A
Aldred
Hi,
I have codes like these:
Private Sub Submit_Click()
Dim dbs As Database
Dim qdf As QueryDef
Set dbs = CurrentDb()
Set qdf = dbs.CreateQueryDef(CheckPartNum, "Select PartNum from PartNum
where PartNum='" & PNum1 & "'")
Set rst = dbs.OpenRecordset("PartNum")
If Not rst.EOF Then
MsgBox ("Found")
Else
MsgBox ("Not Found")
End If
End Sub
My codes are to find out if a part number is already in the table. PartNum
is the table. How could I get the select statement executed?
Thanks.
--
I have codes like these:
Private Sub Submit_Click()
Dim dbs As Database
Dim qdf As QueryDef
Set dbs = CurrentDb()
Set qdf = dbs.CreateQueryDef(CheckPartNum, "Select PartNum from PartNum
where PartNum='" & PNum1 & "'")
Set rst = dbs.OpenRecordset("PartNum")
If Not rst.EOF Then
MsgBox ("Found")
Else
MsgBox ("Not Found")
End If
End Sub
My codes are to find out if a part number is already in the table. PartNum
is the table. How could I get the select statement executed?
Thanks.
--