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 Programming / December 2007

Tip: Looking for answers? Try searching our database.

updating one field from another

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JohnE - 31 Dec 2007 17:31 GMT
I have an edit form that when the txtbox for the zip code is changed/entered,
I would like to have cboArea update automatically.  I have put the following
in the On Exit of the txtbox;

Me.cboArea = Me.cboArea.Column(1)

Column 1 (starting with 0) is the column I want to have added/updated.  Also
tried the above code line in the On Current of the edit form.  Neither of
these are working.  Am I missing something?

Thanks for reviewing this.

... John
Ken Snell (MVP) - 31 Dec 2007 18:09 GMT
A combobox's columns come from the RowSource query for that combobox. You
cannot change the data in the form itself for the combobox's Columns. You
must change the data in the table, then requery the combobox so that it
displays the updated data. This also will cause the combobox to be "reset"
to the first value in the list, so you might need to also run code to set
the combobox to the desired value after the requery.

To give more specific suggestions, you'll need to give us more details about
what your form's purpose and use are.

Signature

       Ken Snell
<MS ACCESS MVP>

>I have an edit form that when the txtbox for the zip code is
>changed/entered,
[quoted text clipped - 12 lines]
>
> ... John
Beetle - 31 Dec 2007 18:11 GMT
Usually you just requery the combo box to update it.

Me.cboArea.Requery

HTH
Signature

_________

Sean Bailey

> I have an edit form that when the txtbox for the zip code is changed/entered,
> I would like to have cboArea update automatically.  I have put the following
[quoted text clipped - 9 lines]
>
> ... John
John W. Vinson - 31 Dec 2007 18:21 GMT
>I have an edit form that when the txtbox for the zip code is changed/entered,
>I would like to have cboArea update automatically.  I have put the following
[quoted text clipped - 9 lines]
>
>... John

This is making no sense to me. You are setting the value of cboArea to the
value of cboArea???

Do you need to use the combo's Not In List event, or what? What's the
Rowsource of the combo; its Control Source; and the bound column?

            John W. Vinson [MVP]
 
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.