Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Beginner needs help with SQL expression

$
0
0
Hi all,
I could not figure out why this code not working? The query works perfectly when i ran it in Access. I don't know whey it is not working here?
The query result is get the record in NameTbl where NameId eq selected name list id on form.
Any helps will be appreciated. thanks.

Dim dbs As Database
Dim rst As DAO.Recordset
Dim strSQL As String


Set dbs = CurrentDb()


strSQL = "SELECT NameTbl.* from NameTbl where NameTbl.[NameID]=CInt(Me.ChooseListBox.Value)"

Set rst = dbs.OpenRecordset(strSQL, Type:=dbOpenDynaset)

Viewing all articles
Browse latest Browse all 13329

Latest Images

Trending Articles



Latest Images