C
Chris Lines
Guys - I have read all the posts here and have found the answer to my
question. But I can't for the life of me get it to work. I therefore seek
more help pls to resolve the problem. Two tables: tblTeamMembers and
tblTeamLocation. All fields from these tables are on a query-based, single
form. Location details are at the bottom of the form. I am trying to fill in
several txtboxes using query-based cboTeamLocation. I am using the code
provided in several posts. It is as follows:
Private Sub cboTeamLocation_AfterUpdate()
Me.TeamLocationBuilding.Value = Me.cboTeamLocation.Column(2)
Me.TeamLocationAddress.Value = Me.cboTeamLocation.Column(3)
Me.TeamLocationCity.Value = Me.cboTeamLocation.Column(4)
Me.TeamLocationZip.Value = Me.cboTeamLocation.Column(5)
Me.TeamLocationCountry.Value = Me.cboTeamLocation.Column(6)
End Sub
When I use cboTeamLocation it works and so does TeamLocationBuilding. But
when I debug it shows all the other txtboxes as returning a null value. And I
get runtime error 3314 telling me that I must enter a value. I understand
that message, but cannot work out why I keep getting a null value. Have I got
the code wrong? I would appreciate help pls.
Regards
question. But I can't for the life of me get it to work. I therefore seek
more help pls to resolve the problem. Two tables: tblTeamMembers and
tblTeamLocation. All fields from these tables are on a query-based, single
form. Location details are at the bottom of the form. I am trying to fill in
several txtboxes using query-based cboTeamLocation. I am using the code
provided in several posts. It is as follows:
Private Sub cboTeamLocation_AfterUpdate()
Me.TeamLocationBuilding.Value = Me.cboTeamLocation.Column(2)
Me.TeamLocationAddress.Value = Me.cboTeamLocation.Column(3)
Me.TeamLocationCity.Value = Me.cboTeamLocation.Column(4)
Me.TeamLocationZip.Value = Me.cboTeamLocation.Column(5)
Me.TeamLocationCountry.Value = Me.cboTeamLocation.Column(6)
End Sub
When I use cboTeamLocation it works and so does TeamLocationBuilding. But
when I debug it shows all the other txtboxes as returning a null value. And I
get runtime error 3314 telling me that I must enter a value. I understand
that message, but cannot work out why I keep getting a null value. Have I got
the code wrong? I would appreciate help pls.
Regards