Good day.
i am trying to count records on table based on criteria, then show it in unbound text box. i try this code for it:
Me.myText = DCount("tFName", "tblMembers", "[tOrgNick] = 'Me.lstOrg.Column(0)'")
it does not work. then i try this one:
Dim nShow As Integer
Dim tShow As String
tShow = Me.lstOrg.Column(0)
nShow = DCount("*", "tblMembers", "[tOrgNick] = 'tShow'")
Me.myText = nShow //edit: forgot this line
it also did not work. in watch window, tShow = "Lfarmer", nShow = 0
there are 16 records for "Lfarmer" in the table.
please enlighten me.
btw, i remember there is a "North Wind" (or something) sample database application in previous version of access but i cannot find it in help section. where can i find it?
i am trying to count records on table based on criteria, then show it in unbound text box. i try this code for it:
Me.myText = DCount("tFName", "tblMembers", "[tOrgNick] = 'Me.lstOrg.Column(0)'")
it does not work. then i try this one:
Dim nShow As Integer
Dim tShow As String
tShow = Me.lstOrg.Column(0)
nShow = DCount("*", "tblMembers", "[tOrgNick] = 'tShow'")
Me.myText = nShow //edit: forgot this line
it also did not work. in watch window, tShow = "Lfarmer", nShow = 0
there are 16 records for "Lfarmer" in the table.
please enlighten me.
btw, i remember there is a "North Wind" (or something) sample database application in previous version of access but i cannot find it in help section. where can i find it?