I recently had to alter my database to change the primary key in the Accounts table include the Country as well as the Master Number. A combo box I had on the [Transfer to Other Manager] form that was working fine before now produces the error "Recordset not updatable" when I try to select a different value. The field the combo box is bound to is in an intermediary table [Manager Accounts]. The field contains the [Manager Login]. This table includes the [Master Number] for the account, the [Country] for the account, and the [Manager Login]. This is the SQL for the query that the form is based on
SELECT Accounts.[Account Name], Accounts.Area, Accounts.Country, Managers.[Manager Name], Managers.[Manager Login], Managers.[Sup ID], [Manager Accounts].[Master Number], [Manager Accounts].[Manager Login], [Manager Accounts].[Reports Login], Accounts.[Master Number], [Manager Accounts].Country
FROM (Sups INNER JOIN SAMs ON Sups.[Sup ID] = Managers.[Sup ID]) INNER JOIN (Accounts INNER JOIN [Manager Accounts] ON Accounts.[Master Number] = [Manager Accounts].[Master Number]) ON Managers.[Manager Login] = [Manager Accounts].[Manager Login]
WHERE (((Accounts.Country)=Left([Forms]![Transfer Accounts]![cboAcct],2)) AND (([Manager Accounts].[Master Number])=Right([Forms]![Transfer Accounts]![cboAcct],Len([Forms]![Transfer Accounts]![cboAcct])-2)));
Can anyone help? I've searched the forums and couldn't find anyone else that had this problem with a combo box being caused by a primary key with two fields. The thing that confused me even more is that the primary key that changed is not even in the table the combo box is bound to.
Thanks,
Chris
SELECT Accounts.[Account Name], Accounts.Area, Accounts.Country, Managers.[Manager Name], Managers.[Manager Login], Managers.[Sup ID], [Manager Accounts].[Master Number], [Manager Accounts].[Manager Login], [Manager Accounts].[Reports Login], Accounts.[Master Number], [Manager Accounts].Country
FROM (Sups INNER JOIN SAMs ON Sups.[Sup ID] = Managers.[Sup ID]) INNER JOIN (Accounts INNER JOIN [Manager Accounts] ON Accounts.[Master Number] = [Manager Accounts].[Master Number]) ON Managers.[Manager Login] = [Manager Accounts].[Manager Login]
WHERE (((Accounts.Country)=Left([Forms]![Transfer Accounts]![cboAcct],2)) AND (([Manager Accounts].[Master Number])=Right([Forms]![Transfer Accounts]![cboAcct],Len([Forms]![Transfer Accounts]![cboAcct])-2)));
Can anyone help? I've searched the forums and couldn't find anyone else that had this problem with a combo box being caused by a primary key with two fields. The thing that confused me even more is that the primary key that changed is not even in the table the combo box is bound to.
Thanks,
Chris