Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I am having difficulty with

Status
Not open for further replies.

FuzzyBear9

Technical User
Jan 14, 2002
37
GB
Hi,

I am having difficulty with combo boxes in Access 97.

I have followed some of the examples on Tek-Tips for limiting data displayed in one combo box based on the selection made in a previous combo box. These work fine with sample databases.

I have tried to use the same setup for a single table, where users select a Company name from a combo box. Then when they move to select a contact from a second combo box, the data is limited to those contacts associated with the selected company.

Control Source for Contact combo box is a query:
SELECT [FirstName(s)] & " " & [Surname] AS Name
FROM tblClient
WHERE (((tblClient.ClientID)=[forms]![frmOutcome]![ClientID].[Value]));

I have placed this piece of code in the After Update for the Client combo box.

Private Sub ClientID_AfterUpdate()
Me.Contact.Requery
End Sub

I sometimes get different names or no names at all. Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top