Results 1 to 3 of 3
  1. #1
    tsgtnissen is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    28

    Set the value of a textbox based on the value of another textbox?

    My Question: I would like to have what ever dollar value I type in textbox1 to automatically input its valve into textbox2.



    What I know so far: I know I will need to enter this code in the "After Update" section.

    The code below is darn close, but what does it need to say if I want to ensure the same $ amount in textbox1 is set to textbox2?


    Code:
    Private Sub Textbox1_AfterUpdate()
       If Textbox1.Value = "1" Then
          Textbox2.Value = "10"
       End If
       
    End Sub

    Thank you all so much.

    V/R
    Justin

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Try the following, but how do you know it will be a dollar value?
    Private Sub Textbox1_AfterUpdate()


    Me.Textbox2 = Me.textbox1
    me.requery
    End Sub

  3. #3
    tsgtnissen is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    28
    Thank you so much, that worked!
    Last edited by tsgtnissen; 02-18-2015 at 12:34 AM.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Value of TextBox based on ComboBox
    By John V in forum Forms
    Replies: 13
    Last Post: 07-12-2014, 12:06 PM
  2. Replies: 2
    Last Post: 01-08-2014, 05:18 PM
  3. Replies: 2
    Last Post: 04-20-2013, 03:37 AM
  4. Replies: 8
    Last Post: 04-12-2013, 08:59 PM
  5. Replies: 17
    Last Post: 02-08-2012, 10:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums