I am new to access.
i have a subform (datasheet view), which contains 3 combo box(client, project, task), and here 's what i am trying to do:
after selection in client, i want Project and task to show the list that's ONLY associated to the choosen client.
I got this part done ok.
however, when i reopen the form again, Everything i choosed from the last step wasn't showing in the form. However, the information seems stored in the main table. How could i get it to show in my subform?
I used the code from a article i found in here, which is:
Private Sub ClientID_AfterUpdate()
With Me![ProjectID]
If IsNull(Me!ClientID) Then
.RowSource = ""
Else
.RowSource = "select [ProjectD],[Project] " & "from Sites " & " where [ClientID]=" & Me![ClientID]
End If
End With
With Me![TaskID]
If IsNull(Me!ClientID) Then
.RowSource = ""
Else
.RowSource = "select distinct [TaskID],[TaskDescription] " & "from Tasks " & " where [ClientID]=" & Me![ClientID]
End If
End With
End Sub
Can someone help me with the displaying problem?Thanks.