T
Trepalium
I am having difficulty with a listbox currently. I am setting the
bound column property through VBA using the code
List2.BoundColumn = 11
There are 11 columns. The default bound column is 1 in my properties.
This code worked literally 5 minutes ago, but now it does not. Is
there any reason that a bound column wouldn't work? Code below. This
code is being executed when a command button is being clicked.
--------------------------------------------------------------------------------------------------------------------------------------------
Dim PstClsNme As String, PstClsID As String, PstClsAssignDte As Date,
AppID As String, Tpe As String
List2.BoundColumn = 11
Tpe = List2.Value
If Tpe = "D2RE" Then
D2RE = True
ElseIf Tpe = "Partner" Then
Partner = True
End If
List2.BoundColumn = 2
Combo2.SetFocus
PstClsNme = Combo2.Text
Call DBConnect
sql = "SELECT USERID, NAME FROM " & tblUserData & " WHERE NAME = '" &
PstClsNme & "'"
rsdata.Open (sql)
If rsdata.EOF Then
MsgBox "Post-Closer could not be located!", vbCritical, "Post-
Closer Not Found!"
rsdata.Close
Else
PstClsNme = rsdata("Name")
PstClsID = rsdata("USERID")
PstClsAssignDte = Format(Date, "mm/dd/yyyy")
AppID = List2.Value
rsdata.Close
sql = "INSERT INTO " & tblFileAssign & " VALUES ('" & PstClsID &
"', '" & PstClsNme & "','" & AppID & "','" & PstClsAssignDte & "')"
rsdata.Open (sql)
If D2RE = True Then
sql = "UPDATE " & tblCustInfoD2RE & " SET ASSIGNED = 1 WHERE
CLAPPLNUMBER = '" & AppID & "'"
rsdata.Open (sql)
List2.RemoveItem (AppID)
ElseIf Partner = True Then
End If
End If
--------------------------------------------------------------------------------------------------------------------------------------------
Column 11 tells if a particular item is D2RE or Partner. They are both
strings.
Any help would be appreciated.
bound column property through VBA using the code
List2.BoundColumn = 11
There are 11 columns. The default bound column is 1 in my properties.
This code worked literally 5 minutes ago, but now it does not. Is
there any reason that a bound column wouldn't work? Code below. This
code is being executed when a command button is being clicked.
--------------------------------------------------------------------------------------------------------------------------------------------
Dim PstClsNme As String, PstClsID As String, PstClsAssignDte As Date,
AppID As String, Tpe As String
List2.BoundColumn = 11
Tpe = List2.Value
If Tpe = "D2RE" Then
D2RE = True
ElseIf Tpe = "Partner" Then
Partner = True
End If
List2.BoundColumn = 2
Combo2.SetFocus
PstClsNme = Combo2.Text
Call DBConnect
sql = "SELECT USERID, NAME FROM " & tblUserData & " WHERE NAME = '" &
PstClsNme & "'"
rsdata.Open (sql)
If rsdata.EOF Then
MsgBox "Post-Closer could not be located!", vbCritical, "Post-
Closer Not Found!"
rsdata.Close
Else
PstClsNme = rsdata("Name")
PstClsID = rsdata("USERID")
PstClsAssignDte = Format(Date, "mm/dd/yyyy")
AppID = List2.Value
rsdata.Close
sql = "INSERT INTO " & tblFileAssign & " VALUES ('" & PstClsID &
"', '" & PstClsNme & "','" & AppID & "','" & PstClsAssignDte & "')"
rsdata.Open (sql)
If D2RE = True Then
sql = "UPDATE " & tblCustInfoD2RE & " SET ASSIGNED = 1 WHERE
CLAPPLNUMBER = '" & AppID & "'"
rsdata.Open (sql)
List2.RemoveItem (AppID)
ElseIf Partner = True Then
End If
End If
--------------------------------------------------------------------------------------------------------------------------------------------
Column 11 tells if a particular item is D2RE or Partner. They are both
strings.
Any help would be appreciated.