G
Guest
Hi
I use a data base to store items in a table called so. I want when I type an
item code on a combo box and that item is already stored, to bring that
record on an open subform and fill the values. To do so I have the code:
Dim strFilter As String
Dim rsCurr As DAO.Recordset
Dim strSQL As String
strFilter = "ItemCode = '" & Me!cboItemCode & "'"
strSQL = "SELECT Kind, Model, Type FROM Items WHERE ItemCode =
'strFilter' ;"
Set rsCurr = CurrentDb().OpenRecordset(strSQL)
If rsCurr.EOF = False Then
Me!cboKind = rsCurr!Kind
Me!cboType = rsCurr!Type
Me!cboModel = rsCurr!Model
End If
Although I type or select on cboItemCode a value that is already stored I
never get the rest combos auto filled. Do you know what is wrong?
Thanks a lot
GL
I use a data base to store items in a table called so. I want when I type an
item code on a combo box and that item is already stored, to bring that
record on an open subform and fill the values. To do so I have the code:
Dim strFilter As String
Dim rsCurr As DAO.Recordset
Dim strSQL As String
strFilter = "ItemCode = '" & Me!cboItemCode & "'"
strSQL = "SELECT Kind, Model, Type FROM Items WHERE ItemCode =
'strFilter' ;"
Set rsCurr = CurrentDb().OpenRecordset(strSQL)
If rsCurr.EOF = False Then
Me!cboKind = rsCurr!Kind
Me!cboType = rsCurr!Type
Me!cboModel = rsCurr!Model
End If
Although I type or select on cboItemCode a value that is already stored I
never get the rest combos auto filled. Do you know what is wrong?
Thanks a lot
GL