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 / April 2007

Tip: Looking for answers? Try searching our database.

Combo box to update field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GerryE - 13 Apr 2007 18:34 GMT
I have a combo box (DesignJobSize) wich the row source type is set to Value
list and the row source is "XS";"S";"M";"L";"XL".  What code can I add to the
After Udated event to update the HrsAllocated field.  I want that field to
show "2" if the XS is selected from the combo box, "4" if S is selected, "8"
if M is selected, "12" if large is selected and "(Blank)" if XL is selected.  
This is to show the amount of hours are needed for each project when a
designer is working on it.  Is this possible?  Your help is greatly
appreciated.
John W. Vinson - 13 Apr 2007 23:02 GMT
>I have a combo box (DesignJobSize) wich the row source type is set to Value
>list and the row source is "XS";"S";"M";"L";"XL".  What code can I add to the
[quoted text clipped - 4 lines]
>designer is working on it.  Is this possible?  Your help is greatly
>appreciated.

I'd change the combo's properties so that the HrsAllocated is included. Set
the Column Count to 2 and  intersperse the numeric values:

"XS";2;"S";4;"M";8;"L";12;"XL";Null

You can then either "push" the second column into a bound control in the
combo's AfterUpdate event, or - probably better - simply display it by putting
a textbox on the form with a control source

=DesignJobSize.Column(1)

to display the second column (it's zero based).

            John W. Vinson [MVP]
Carl Rapson - 13 Apr 2007 23:03 GMT
Something like:

Select Case DesignJobSize
   Case "XS"
       HrsAllocated = "2"
   Case "S"
       HrsAllocated = "4"
   Case "M"
       HrsAllocated = "8"
   Case "L"
       HrsAllocated = "12"
   Case "XL"
       HrsAllocated = ""
End Select

Carl Rapson

>I have a combo box (DesignJobSize) wich the row source type is set to Value
> list and the row source is "XS";"S";"M";"L";"XL".  What code can I add to
[quoted text clipped - 7 lines]
> designer is working on it.  Is this possible?  Your help is greatly
> appreciated.
 
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.