HERE IS MY CODE
Dim rst As Recordset
Dim cnn As ADODB.Connection
Dim strFilter As String
Set cnn = CurrentProject.Connection
Set rst = New ADODB.Recordset
STRPROMPT = "PLEASE ENTER PART NUMBER"
vPTNR = InputBox(PROMPT:=STRPROMPT, _
Title:="PART NUMBER", XPos:=5000, YPos:=5000)
STRPROMPT = "PLEASE ENTER REVISION"
vREV = InputBox(PROMPT:=STRPROMPT, _
Title:="REVISION", XPos:=5000, YPos:=5000)
rst.Open "tblfinishing", cnn, adOpenKeyset
strFilter = "[ptnr]='" & vPTNR & "' and [rev]='" & vREV & "'"
rst.FILTER = strFilter
If rst.BOF = True Then
OFCHECK = True
ElseIf rst.EOF = True Then
OFCHECK = True
Else
OFCHECK = False
End If
Select Case OFCHECK
Case Is = False
'********
'********
'********
Case Else
MsgBox "No record for part number " & vPTNR & " and revision " & vREV & "."
End Select
rst.Close
NOTICE THE ******** IN THE CODE
I need to write something that would display the records in the filtered recordset in a table format (this is needed for reference only, no need to store the filtered records in another table)
How do I do this?
Good luck,
Kuzz
"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."
Dim rst As Recordset
Dim cnn As ADODB.Connection
Dim strFilter As String
Set cnn = CurrentProject.Connection
Set rst = New ADODB.Recordset
STRPROMPT = "PLEASE ENTER PART NUMBER"
vPTNR = InputBox(PROMPT:=STRPROMPT, _
Title:="PART NUMBER", XPos:=5000, YPos:=5000)
STRPROMPT = "PLEASE ENTER REVISION"
vREV = InputBox(PROMPT:=STRPROMPT, _
Title:="REVISION", XPos:=5000, YPos:=5000)
rst.Open "tblfinishing", cnn, adOpenKeyset
strFilter = "[ptnr]='" & vPTNR & "' and [rev]='" & vREV & "'"
rst.FILTER = strFilter
If rst.BOF = True Then
OFCHECK = True
ElseIf rst.EOF = True Then
OFCHECK = True
Else
OFCHECK = False
End If
Select Case OFCHECK
Case Is = False
'********
'********
'********
Case Else
MsgBox "No record for part number " & vPTNR & " and revision " & vREV & "."
End Select
rst.Close
NOTICE THE ******** IN THE CODE
I need to write something that would display the records in the filtered recordset in a table format (this is needed for reference only, no need to store the filtered records in another table)
How do I do this?
Good luck,
Kuzz
"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."