Re: Sync Subform with Mainform
On Apr 12, 12:43 pm, Marshall Barton <marshbar...@wo wway.comwrote:
OK, by "it" I meant the combo box. Instead of showing everything in
multiple columns like you have suggested, I was showing them all in
one column (them is TicketID and Customer First and Last name). I
have implemented the code you suggested above and I get the same
result...which is:
Scenario. I have three customers. Bobby Fink, Nick Klein, and Bernie
Teplan. Each of these customers has one ticket ID assigned to them.
Bobby Fink has ticket ID 1287, Nick Klein also has ticket ID 1287
(which is a different service request, just here for testing
purposes), and Bernie Teplan has ticket ID 5545.
If the mainform is currently displaying Bobby Fink (as the customer)
and I click the combo box, here's what I get in the drop down:
Bobby Fink 1287
Bobby Fink 1287
Bobby Fink 5545
If I then switch to Nick Klein on the mainform and click the combo
box, I see this:
Nick Klein 1287
Nick Klein 1287
Nick Klein 5545
Finally, If I switch to Bernie Teplan and click the combo box, I get
this result:
Bernie Teplan 1287
Bernie Teplan 1287
Bernie Teplan 5545
Thank you again for your help, I just wanted you to know what exactly
is happening as it is hard to explain (at least for me) any other way.
On Apr 12, 12:43 pm, Marshall Barton <marshbar...@wo wway.comwrote:
Robert Jacobs wrote:
>
Let's try this again. I am lost as to what "it" you are
referring to that has the customer name. The combo box will
of course display the customer name because that's what you
wanted it to do. AFAIK, the only other "it" that displays a
ticket ID is the subform and I don't see how the combo box
can affect a control in the subform.
>
Maybe you should try a slightly different approach. Change
the combo box's Row Source to:
>
SELECT DISTINCT [Ticket ID],
contactfirstnam e & " " & contactlastname As CN,
CustomerID
FROM [Service Records]
>
And change the combo box's ColumnCount to 3 and ColumnWidth
to something like .6;1.3;0
Then see what effect you get.
>
--
Marsh
The combo box is in the mainform's (customers) header section. When
on the mainform, and a customer is displayed as the current record,
clicking the combobox shows all of the ticket IDs, but it has the name
of the currently selected customer next to each ticket ID.
on the mainform, and a customer is displayed as the current record,
clicking the combobox shows all of the ticket IDs, but it has the name
of the currently selected customer next to each ticket ID.
Let's try this again. I am lost as to what "it" you are
referring to that has the customer name. The combo box will
of course display the customer name because that's what you
wanted it to do. AFAIK, the only other "it" that displays a
ticket ID is the subform and I don't see how the combo box
can affect a control in the subform.
>
Maybe you should try a slightly different approach. Change
the combo box's Row Source to:
>
SELECT DISTINCT [Ticket ID],
contactfirstnam e & " " & contactlastname As CN,
CustomerID
FROM [Service Records]
>
And change the combo box's ColumnCount to 3 and ColumnWidth
to something like .6;1.3;0
Then see what effect you get.
>
--
Marsh
multiple columns like you have suggested, I was showing them all in
one column (them is TicketID and Customer First and Last name). I
have implemented the code you suggested above and I get the same
result...which is:
Scenario. I have three customers. Bobby Fink, Nick Klein, and Bernie
Teplan. Each of these customers has one ticket ID assigned to them.
Bobby Fink has ticket ID 1287, Nick Klein also has ticket ID 1287
(which is a different service request, just here for testing
purposes), and Bernie Teplan has ticket ID 5545.
If the mainform is currently displaying Bobby Fink (as the customer)
and I click the combo box, here's what I get in the drop down:
Bobby Fink 1287
Bobby Fink 1287
Bobby Fink 5545
If I then switch to Nick Klein on the mainform and click the combo
box, I see this:
Nick Klein 1287
Nick Klein 1287
Nick Klein 5545
Finally, If I switch to Bernie Teplan and click the combo box, I get
this result:
Bernie Teplan 1287
Bernie Teplan 1287
Bernie Teplan 5545
Thank you again for your help, I just wanted you to know what exactly
is happening as it is hard to explain (at least for me) any other way.
Comment