Hi,
I've got some SQL which i use to populate a list box which is in a subform. The list box has the following SQL as its row source:
SELECT Contracts.ContractID, Contracts.Description, Providers.[Provider Name], Contracts.ClientID FROM Providers INNER JOIN (Clients INNER JOIN Contracts ON Clients.ClientID=Contracts.ClientID) ON Providers.ProviderID=Contracts.ProviderID WHERE (((Contracts.ClientID)=Forms![ClientDetails]![ClientID]));
When i open the sub form by itself it works fine, however when it is openned as a subform, Access asks me tp specify the value of
Forms![ClientDetails]![ClientID]
I assume this is something to do with the way my SQL is referencing th sub form but i can't figure out what.
I've tried using:
Forms![AddEditClients]![ClientDetails]![ClientID]
(AddEditClients is the master form)
But to no avail.
Is there anyway around this problem?
Cheers
I've got some SQL which i use to populate a list box which is in a subform. The list box has the following SQL as its row source:
SELECT Contracts.ContractID, Contracts.Description, Providers.[Provider Name], Contracts.ClientID FROM Providers INNER JOIN (Clients INNER JOIN Contracts ON Clients.ClientID=Contracts.ClientID) ON Providers.ProviderID=Contracts.ProviderID WHERE (((Contracts.ClientID)=Forms![ClientDetails]![ClientID]));
When i open the sub form by itself it works fine, however when it is openned as a subform, Access asks me tp specify the value of
Forms![ClientDetails]![ClientID]
I assume this is something to do with the way my SQL is referencing th sub form but i can't figure out what.
I've tried using:
Forms![AddEditClients]![ClientDetails]![ClientID]
(AddEditClients is the master form)
But to no avail.
Is there anyway around this problem?
Cheers