bombplayer
Programmer
I am trying to pull up multiple data fields from a SQL view with the use of a combo box. This is the code I am using:
Private Sub cboSelect_computer_AfterUpdate()
Dim str2 As String
Me.Controls(cboSelect_Computer.Column(0)).SetFocus
DoCmd.FindRecord cboSelect_Computer
str2 = Me.Controls(cboSelect_Computer.Column(0))
End Sub
When I try to run it real time, I get an error that it cannot find the ID from the lookup with several blank characters after the ID i.e. "01234 " cannot be found. 01234 is in the database.
I think I am way off on this. Any help would be appreciated.
Private Sub cboSelect_computer_AfterUpdate()
Dim str2 As String
Me.Controls(cboSelect_Computer.Column(0)).SetFocus
DoCmd.FindRecord cboSelect_Computer
str2 = Me.Controls(cboSelect_Computer.Column(0))
End Sub
When I try to run it real time, I get an error that it cannot find the ID from the lookup with several blank characters after the ID i.e. "01234 " cannot be found. 01234 is in the database.
I think I am way off on this. Any help would be appreciated.