Populating fields from a combo box

K

kyleq

When entering a financial transaction I select the payee from a combo box
(Payee_cbo) that references a query (P_Payee_qry) that has the payee name and
also has the usual pay method and transaction category for that payee.
The field names are Payee_txt, PayMeth_txt, and TranCat_txt.

When I select the payee I want PayMeth_txt to populate a control named
PayMeth_cbo that is bound to PayMeth_txt and TranCat_txt to populate
TranCat_cbo that is bound to TranCat_txt both in the master table. Both of
the controls are combo boxes that can look up the pay method and transaction
category if they are new to the system.

I used the following code in the After Update event on the Payee_cbo combo
box.

If IsNull(Me!TranCat_cbo) Then
Me!TranCat_cbo = Me!P_Payee_qry & Me!TranCat_txt
End If
If IsNull(Me!TranMeth_txt) Then
Me!TranMeth_cbo = Me!P_Payee_qry & Me!TranMeth_txt
End If

The result is the Payee name (Payee_txt) populates both the TranMeth_cbo and
TranCat_cbo. I have tried several variations without getting the right
result.

Any help would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top