Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

Selection from combo box doesn't fill text box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
So Call Me Crazy - 14 May 2008 21:31 GMT
I have a combo box with 2 columns.  Combo's bound column is 1 -- that part is
working great.  I want the combo's 2nd column to fill a text box.  The caviat
to this is that the text box is bound to a field in the table.  I want the
user to be able to change the value stored in that bound text box if they
change the value via the combo box.

What is happening, however, is that the text box ends up being cleared out.

The code I have is extremely simple.  In the AfterUpdate event of the combo
box, I assign the text box the contents of the second column from the combo
box:

me.textboxname = me.comboboxname.column(2)

So, what am I missing?
Beetle - 14 May 2008 23:16 GMT
The column property is a zero based numbering system, so the first column
is Column(0), second is Column(1), etc. You said your combo box has two
columns, so Column(2) would refer to the third column, which doesn't
exist.

Having said that, what are you trying to do? Are you redundantly storing the
same data in two different tables (which is usually not necessary to do)?
Signature

_________

Sean Bailey

> I have a combo box with 2 columns.  Combo's bound column is 1 -- that part is
> working great.  I want the combo's 2nd column to fill a text box.  The caviat
[quoted text clipped - 11 lines]
>
> So, what am I missing?
So Call Me Crazy - 15 May 2008 14:35 GMT
Oh brother!  I knew it was something really silly!  That was exactly my
problem.

I forgot that, programmatically, it was zero based.  But that within Access'
form builder, it isn't!

Thanks so much!

> The column property is a zero based numbering system, so the first column
> is Column(0), second is Column(1), etc. You said your combo box has two
[quoted text clipped - 19 lines]
> >
> > So, what am I missing?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.