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 / Modules / DAO / VBA / May 2007

Tip: Looking for answers? Try searching our database.

Setting Multiple Values

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jk - 19 May 2007 05:11 GMT
I am trying set the value of a textbox based on the value of another textbox
using the value 1 to get 10 as an example below but how do set it up is you
have several values?Is this code repeated each time for the additional values
like 2,3,4,5 to get 11,12,13,14? Is repeating the code the only way to do
this?

Private Sub Textbox1_AfterUpdate()

   If Textbox1.Value = "1" Then
       Textbox2.Value = "10"
   End If

End Sub
Alex Dybenko - 19 May 2007 10:03 GMT
Hi,
you can either add 9, or use select case, or use switch function, perhaps
first is a best option

Textbox2.Value = val(Textbox1.Value ) + 9

Signature

Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

>I am trying set the value of a textbox based on the value of another
>textbox
[quoted text clipped - 12 lines]
>
> End Sub
jk - 19 May 2007 13:38 GMT
Thanks for the response.Could you give me an example since i am not sure what
adding the number nine does? I am wanting the end user to select a value in
one text box and then a associated value would appear in another text box.The
first textbox would use a drop down list of values the user can select then
the second text text box would automatically fill in according to the
selected value.

> Hi,
> you can either add 9, or use select case, or use switch function, perhaps
[quoted text clipped - 18 lines]
> >
> > End Sub
Alex Dybenko - 20 May 2007 09:39 GMT
Hi,
what do you mean with "fill in according to the selected value"? is it some
formula? or you want to select data from the table?

Signature

Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

> Thanks for the response.Could you give me an example since i am not sure
> what
[quoted text clipped - 30 lines]
>> >
>> > End Sub
 
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.