T
Toys
I'll do my best to describe the problem I am having. I have a time sheet
form that I use for each account manager. The subform is so that account
manager can capture all of his daily transactions to different clients. This
subform is in datasheet view. The subdata sheet works as follows: An
account manager selects the client from a field called "AgentCode". He then
needs to select a contact from that client from a field called "Contacts".
These fields are related to fields in a "Client" table and "Contacts" table,
respectively. In order that they can only select a contact from the
appropriate client, the row source of the "contacts" field is as follows:
SELECT Contacts.ID, Contacts.FName, Contacts.LName, Contacts.Position,
Contacts.AgentCode
FROM Contacts
WHERE (((Contacts.AgentCode)=[Forms]![TimeCard]![TimeCardDetail
Subform].[Form]![AgentCode]));
The field is bound to column 1, and the addiontal columns are mostly for
reference. As you can see, I am trying to filter the available contacts by
the agent code in the previous field. My afterupdate requery is 'working'.
By this I mean, for all new records I only get the contacts related to that
agent code. However, contacts in previous records are now becoming blank!
Interestingly enough, the data is being saved properly in my table. It is
quite bothersome that every afterupdate (for the agentcode field) causes the
contact next to that agent code to be blank (unless a previous agentcode
matches the current one).
Any idea how I can prevent this from happening?
form that I use for each account manager. The subform is so that account
manager can capture all of his daily transactions to different clients. This
subform is in datasheet view. The subdata sheet works as follows: An
account manager selects the client from a field called "AgentCode". He then
needs to select a contact from that client from a field called "Contacts".
These fields are related to fields in a "Client" table and "Contacts" table,
respectively. In order that they can only select a contact from the
appropriate client, the row source of the "contacts" field is as follows:
SELECT Contacts.ID, Contacts.FName, Contacts.LName, Contacts.Position,
Contacts.AgentCode
FROM Contacts
WHERE (((Contacts.AgentCode)=[Forms]![TimeCard]![TimeCardDetail
Subform].[Form]![AgentCode]));
The field is bound to column 1, and the addiontal columns are mostly for
reference. As you can see, I am trying to filter the available contacts by
the agent code in the previous field. My afterupdate requery is 'working'.
By this I mean, for all new records I only get the contacts related to that
agent code. However, contacts in previous records are now becoming blank!
Interestingly enough, the data is being saved properly in my table. It is
quite bothersome that every afterupdate (for the agentcode field) causes the
contact next to that agent code to be blank (unless a previous agentcode
matches the current one).
Any idea how I can prevent this from happening?