J
Junior
I'm trying to learn better code - the code below in a subform Open event
works but i want to improve it -
Also i haven't been able to get it working when the Where code is text vs.an
integer
1. I want to subtitute strWhere for the Where Clause What should the code
look like?
2. If WHERE was a text string - say TlkpReg_Cert.Type="MIT" .What should the
code look like?
Thanks for any help
Dim strPos As String, strWhere As String
strPos = Me.TxtHybPos
StrWhere = "?"
If strPos = "MIT" Then
Me.cboRegCert.RowSource = "SELECT TlkpReg_Cert.RegID, TlkpReg_Cert.RegDesc,
TlkpReg_Cert.RegGrp, TlkpReg_Cert.PrintOrder " _
& "FROM TlkpReg_Cert WHERE (((TlkpReg_Cert.PrintOrder) < 8)) " _
& "ORDER BY TlkpReg_Cert.PrintOrder;"
ElseIf strPos = "DRT" Then
works but i want to improve it -
Also i haven't been able to get it working when the Where code is text vs.an
integer
1. I want to subtitute strWhere for the Where Clause What should the code
look like?
2. If WHERE was a text string - say TlkpReg_Cert.Type="MIT" .What should the
code look like?
Thanks for any help
Dim strPos As String, strWhere As String
strPos = Me.TxtHybPos
StrWhere = "?"
If strPos = "MIT" Then
Me.cboRegCert.RowSource = "SELECT TlkpReg_Cert.RegID, TlkpReg_Cert.RegDesc,
TlkpReg_Cert.RegGrp, TlkpReg_Cert.PrintOrder " _
& "FROM TlkpReg_Cert WHERE (((TlkpReg_Cert.PrintOrder) < 8)) " _
& "ORDER BY TlkpReg_Cert.PrintOrder;"
ElseIf strPos = "DRT" Then