Hi:
I have two list boxes on a form- one called List12 and the other Program_id. What I want to do is that when the user selects Program_description in List12, the Program_id List box should be populated with Program_id. It does it but only after I get a "Enter Parameter value" prompt and I have to enter the Program_description.
I want this ofcourse done automatically. Both Program_id and Program_description are fields of a Program table.
Here is the code that I have:
Private Sub List12_AfterUpdate()
With Me.[Program_id]
.RowSource = "SELECT [Program_id] " & _
"FROM Program " & _
"WHERE [Program_description]=" & Me.List12
Call .Requery
End With
End Sub
Thanks in advance
I have two list boxes on a form- one called List12 and the other Program_id. What I want to do is that when the user selects Program_description in List12, the Program_id List box should be populated with Program_id. It does it but only after I get a "Enter Parameter value" prompt and I have to enter the Program_description.
I want this ofcourse done automatically. Both Program_id and Program_description are fields of a Program table.
Here is the code that I have:
Private Sub List12_AfterUpdate()
With Me.[Program_id]
.RowSource = "SELECT [Program_id] " & _
"FROM Program " & _
"WHERE [Program_description]=" & Me.List12
Call .Requery
End With
End Sub
Thanks in advance