Send text to combo box

  • Thread starter Thread starter ccoakb
  • Start date Start date
C

ccoakb

I need some help with Access to put some text in a combo form. I want
to add a button to a form and when the user push it it gets the value
from a table doing a select query and the value is filled in the box. I
know nothing about VB and it seems the way to do it but I know how to
program in other langages.

The application is an access database with version 2002 for both frond
and back end.
 
Just found how to do it! The Access help sections need a lot of clicks
to reach some valuable information
 
Just found how to do it! The Access help
sections need a lot of clicks to reach some
valuable information

Glad you solved the problem.

Next time, two things would be helpful: (1) a description of what you are
trying to accomplish, not just how you are trying to do it and (2) more
specific detail of what you have and what you are doing that's not working.
For other good suggestions on effective use of newsgroups, see the FAQ at
http://www.mvps.org/access/netiquette.htm.

Also, if you solve your own problem, it's nice if you can share the solution
with others here, just as a proposed solution to you is shared with everyone
who participates in the newsgroup.

Larry Linson
Microsoft Access MVP
 
I will share my solution with you, here is the code:
VNoClient is the combo box
epResultatID contains the data

Dim x As Variant
x = DLookup("[ClientRef]", "epResultatID")
VNoClient.SetFocus
VNoClient.Text = x
VNoClient.Requery

The Requery function is important because if you don't call it the
other components in the form will not be updated
 

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

Similar Threads


Back
Top