M
-MK-
I need some help getting this to work.
Basically, I want to search a table for certain items,and then display them
in an unbound text box. (unbound, because i need this info from another table)
heres what i got that works:
rsMyRS.Find "[DIR]=" & strDIR
heres what i need to work(basically find DIR and CATAGORY in the table):
rsMyRS.Find "[DIR]=" & strDIR And "[Catagory]=" & strType
-more of the code-
Dim strType As String
Dim strDIR As String
Dim dbMyDB As New ADODB.Connection
Dim rsMyRS As New ADODB.Recordset
Dim strTablename As String
strType = "Investigation"
txtDir.SetFocus
strDIR = txtDir.Text
dbMyDB.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & "Data
Source=V:\QualMgt\DIRS\DIR.mdb"
strTablename = "tblComments"
rsMyRS.Open strTablename, dbMyDB, adOpenKeyset, adLockOptimistic,
adCmdTable
txtDir.SetFocus
rsMyRS.Find "[DIR]=" & strDIR And "[Catagory]=" & strType
txtCom_In.SetFocus
txtCom_In.Text = txtCom_In.Text & rsMyRS!COMMENT
*If only text boxes could have rowsource, then life would be 1000x easier*
Anyone?
Thanks.
-MK-
Basically, I want to search a table for certain items,and then display them
in an unbound text box. (unbound, because i need this info from another table)
heres what i got that works:
rsMyRS.Find "[DIR]=" & strDIR
heres what i need to work(basically find DIR and CATAGORY in the table):
rsMyRS.Find "[DIR]=" & strDIR And "[Catagory]=" & strType
-more of the code-
Dim strType As String
Dim strDIR As String
Dim dbMyDB As New ADODB.Connection
Dim rsMyRS As New ADODB.Recordset
Dim strTablename As String
strType = "Investigation"
txtDir.SetFocus
strDIR = txtDir.Text
dbMyDB.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & "Data
Source=V:\QualMgt\DIRS\DIR.mdb"
strTablename = "tblComments"
rsMyRS.Open strTablename, dbMyDB, adOpenKeyset, adLockOptimistic,
adCmdTable
txtDir.SetFocus
rsMyRS.Find "[DIR]=" & strDIR And "[Catagory]=" & strType
txtCom_In.SetFocus
txtCom_In.Text = txtCom_In.Text & rsMyRS!COMMENT
*If only text boxes could have rowsource, then life would be 1000x easier*
Anyone?
Thanks.
-MK-