×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

More Combo Boxes and DLooUp Help

More Combo Boxes and DLooUp Help

More Combo Boxes and DLooUp Help

(OP)
I was going through the previous question but I don't think that applies to me much. I have a table with my customers in it (tblCustomers) which have among other fields CustID and CustName. I have a data entry form (frmOrders) where there is a combo box (cmbCustID) that looks at the [tblCustomers]![CustID] for the Id Number and a text box [txtCustName]. I want to choose the CustID from the Combo Box and have the Customer Name appear on txtCustName so there wont be any errors. Thank You.

RE: More Combo Boxes and DLooUp Help

cmbCustID column count = 2
 
cmbCustID row source =
Select CustID, CustName from tblCustomers

cmbCustID After Update event =
txtCustName = cmbCustID.Column(1)

(column counting starts at zero)

Regards

Shep

RE: More Combo Boxes and DLooUp Help

(OP)
I tried that but it didn't work.

RE: More Combo Boxes and DLooUp Help

You could try being a little more descriptive - how didn't it work?
Does it compile OK?
Does the combo row source work?
Does it perform the combo drop down OK?
Does it raise an error when you select?
Does anything appear in the text box?
Does it just not do anything?
Have you done what I suggested without any typos / slight amendments?

Shep

RE: More Combo Boxes and DLooUp Help

(OP)
It doesn't compile.
The combo row source works ok
It performs the combo drop down ok
It doesn't raise an error when I select
Nothing appears in the text box
Nope, it doesn't do anything

The only thing it does when I put in to the event row is this: =[txtCustName]=[cmbCustID].[Column](1)

Any ideas?

RE: More Combo Boxes and DLooUp Help

On the event procedure line click the three little dots to the right + select Code Builder.

This should take you thru to the VBA editor with the following...
Private Sub Combo0_AfterUpdate()

End Sub

Put txtCustName = cmbCustID.Column(1) between the 2 lines so you get...

Private Sub Combo0_AfterUpdate()
    txtCustName = cmbCustID.Column(1)
End Sub

Shep

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close