B
Bob Wickham
I have tried many suggestions on how to get this to work but so far no
success.
I have a form with just one table as its record source.
I have two combo boxes
Combo1 is Client_ID. Its row source is SELECT tblClient.ClientID,
tblClient.Client FROM tblClient;
Combo2 is Plan_Writer_ID. Its row source is SELECT
tblPlanWriter.Plan_Writer_ID, tblPlanWriter.Plan_Writer FROM tblPlanWriter;
Both these boxes display text but am I right in assuming they expect a
number.
I have a text box Text1, that has a DLookup as its control source:
=DLookUp("MaxOfPlan_Writer_ID","qryMost_Recent_Planwriter_3","[Client]=Form![Client]")
The purpose of this DLookup is to find the most recent plan writer that did
work for the client selected in Combo1.
Works great, returns a number, being the ID number of the appropriate plan
writer.
Now the challenge.
When creating a new record with this form, first I select a Client in
Combo1.
Text1, with the DLookup, displays a number being the ID of the Plan writer
who last did work for the selected client.
How do I get Combo2 to automaticaly display the same as Text1.
Its imperative that Combo2 remain linked so that I may choose another Plan
writer if I wish.
If I hard code a number 2 into the Default Value of Combo2 its displays a
Plan writers name, so I'm sure its expecting a number.
But if Text1 displays a number 2 and I put something like Me.Combo2 =
Me.Text1 in the After Update event of Text1, I cant get Combo2 to display
anything.
This has been frustrating me for weeks and I really need some assistance.
Thanks
Bob
success.
I have a form with just one table as its record source.
I have two combo boxes
Combo1 is Client_ID. Its row source is SELECT tblClient.ClientID,
tblClient.Client FROM tblClient;
Combo2 is Plan_Writer_ID. Its row source is SELECT
tblPlanWriter.Plan_Writer_ID, tblPlanWriter.Plan_Writer FROM tblPlanWriter;
Both these boxes display text but am I right in assuming they expect a
number.
I have a text box Text1, that has a DLookup as its control source:
=DLookUp("MaxOfPlan_Writer_ID","qryMost_Recent_Planwriter_3","[Client]=Form![Client]")
The purpose of this DLookup is to find the most recent plan writer that did
work for the client selected in Combo1.
Works great, returns a number, being the ID number of the appropriate plan
writer.
Now the challenge.
When creating a new record with this form, first I select a Client in
Combo1.
Text1, with the DLookup, displays a number being the ID of the Plan writer
who last did work for the selected client.
How do I get Combo2 to automaticaly display the same as Text1.
Its imperative that Combo2 remain linked so that I may choose another Plan
writer if I wish.
If I hard code a number 2 into the Default Value of Combo2 its displays a
Plan writers name, so I'm sure its expecting a number.
But if Text1 displays a number 2 and I put something like Me.Combo2 =
Me.Text1 in the After Update event of Text1, I cant get Combo2 to display
anything.
This has been frustrating me for weeks and I really need some assistance.
Thanks
Bob