S
steve a
Hi guys
I'm trying to get this list to automatically select the contents, however
the row source might present with nothing.
i've tried using:
Me.lstcost.SetFocus
If Me.lstcost > "" Then
Me.lstcost.ListIndex = 0
Me.lstcost = Me.[cost]
Else
End If
however if there is no data i get an error saying list index is not being
used properly..
for the row source i'm using:
lstcost.RowSource = "Select tblAll2.cost " & _
"FROM tblAll2 " & _
"WHERE tblAll2.name = '" & txtname.Value & "' " & _
"ORDER BY tblAll2.cost;"
however sometimes the name will not match, and therefore present the list
with nothing..
any ideas? i'm kinda stuck!
Thanks
Steve
I'm trying to get this list to automatically select the contents, however
the row source might present with nothing.
i've tried using:
Me.lstcost.SetFocus
If Me.lstcost > "" Then
Me.lstcost.ListIndex = 0
Me.lstcost = Me.[cost]
Else
End If
however if there is no data i get an error saying list index is not being
used properly..
for the row source i'm using:
lstcost.RowSource = "Select tblAll2.cost " & _
"FROM tblAll2 " & _
"WHERE tblAll2.name = '" & txtname.Value & "' " & _
"ORDER BY tblAll2.cost;"
however sometimes the name will not match, and therefore present the list
with nothing..
any ideas? i'm kinda stuck!
Thanks
Steve