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 / March 2005

Tip: Looking for answers? Try searching our database.

Using Row source of combo box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roy Goldhammer - 23 Mar 2005 13:09 GMT
Hello there

I have a continues form with combobox. If one of the fields is 1 the row
source should be "A"
and if the same field is 2 the row source should be "B"

Is there a way to do this?
Scott McDaniel - 23 Mar 2005 13:24 GMT
If you need to change this on a record-by-record basis, you can change the
.RowSource of your combo in the Form's Current event:

Sub Form_Current()
 If YourField = "1" Then
   YourCombo.RowSource = "SomeSQLString"
 ElseIf YourField = "2" Then
   YourCombo.RowSource = "SomeOtherSQLString"
 End If
End Sub

As users navigate through the records on your continuous form, the
.rowsource will be changed ...
> Hello there
>
[quoted text clipped - 3 lines]
>
> Is there a way to do this?
 
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.