By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,425 Members | 2,549 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,425 IT Pros & Developers. It's quick & easy.

combo box problem -> won't display everything in a subform

P: 12
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 = ""
.RowSource = "select [ProjectD],[Project] " & "from Sites " & " where [ClientID]=" & Me![ClientID]
End If
End With

With Me![TaskID]
If IsNull(Me!ClientID) Then
.RowSource = ""
.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.
Jan 31 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 10K+
P: 14,534
In all honesty I don't understand your problem. Reread your question again and try to explain more clearly what is going on and what you are trying to do. If you close a form then all unbound controls on the form including combo and list boxes will be reset.
Feb 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.