Still learning here.
Looking for the basic way to write strsql and vba to do the following.
Form Name - frmFailedLoopsAddNew
Combobox Name - cboLocationName
Textbox Name - location_number
Table Name - tblIntersectionData
Table Fields - INT #
- Location Name
Here is what I have.
Private Sub cboLocationName_AfterUpdate()
Dim strsql As String
strsql = "SELECT [INT #] FROM [tblIntersectionData]"
strsql = strsql & " Where (((tblIntersectionData.[Intersection Name]) = [Forms]![frmFailedLoopsAddNew]![cboLocation])) "
I want vba to refer to the table and fill the location_number text box with the matching INT # based on the intersection name in the combo box. Seems pretty basic to most of you but I can't seem to figure it out. Surfing web code is helping but also confusing.
I think I have the statement right, but not sure what to do with the data.
Thanks!
Looking for the basic way to write strsql and vba to do the following.
Form Name - frmFailedLoopsAddNew
Combobox Name - cboLocationName
Textbox Name - location_number
Table Name - tblIntersectionData
Table Fields - INT #
- Location Name
Here is what I have.
Private Sub cboLocationName_AfterUpdate()
Dim strsql As String
strsql = "SELECT [INT #] FROM [tblIntersectionData]"
strsql = strsql & " Where (((tblIntersectionData.[Intersection Name]) = [Forms]![frmFailedLoopsAddNew]![cboLocation])) "
I want vba to refer to the table and fill the location_number text box with the matching INT # based on the intersection name in the combo box. Seems pretty basic to most of you but I can't seem to figure it out. Surfing web code is helping but also confusing.
I think I have the statement right, but not sure what to do with the data.
Thanks!